Actual columns: id, user_id, name, model, phone_number, device_model, android_version, sim_slot, battery_level, signal_strength, is_charging, total_sms_sent, total_sms_failed, token, status, last_active, created_at SELECT columns: id, name AS device_name, token AS device_token, model AS device_model, phone_number, status, battery_level, signal_strength, is_charging, total_sms_sent, total_sms_failed, last_active, created_at, device_model, android_version, sim_slot ✅ list.php FIXED ✅ add.php FIXED === Quick test: list devices === Found 0 devices === Quick test: insert === ✗ SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`arvinebd_smsgateway`.`devices`, CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) DONE! Delete this file now.