prepare("SELECT id, name_en, name_ar, phone, loyalty_points FROM customers WHERE name_en LIKE ? OR name_ar LIKE ? OR phone LIKE ? LIMIT 10"); $stmt->execute(["%$query%", "%$query%", "%$query%"]); $customers = $stmt->fetchAll(); echo json_encode($customers); } catch (Exception $e) { echo json_encode([]); }