Hi, as soon as I add a JOIN clause in my SQL request (browse FORM), it stops working (no record is returned); if I remove the clause (and the relevant fields to be displayed) I get the expected rows.
How can I handle this clause?
SELECT consultations.date, patients.nom, patients.prenom, consultations.type, consultations.prix, consultations.type_reglement
FROM consultations JOIN patients ON consultations.id_patient = patients.id
WHERE consultations.date_encaissement IS NULL
ORDER BY consultations.date DESC
SELECT date, nom, prenom, type, prix, type_reglement FROM (
SELECT consultations.id, consultations.date, patients.nom, patients.prenom, consultations.type, consultations.prix, consultations.type_reglement
FROM consultations JOIN patients ON consultations.id_patient = patients.id
WHERE consultations.date_encaissement IS NULL
) T
ORDER BY consultations.date DESC
Users browsing this forum: absalom, GlenMcCabe and 28 guests