Requete avec LEFT JOIN et USING 2 conditions
Bonjour ou bonsoir,
je me demande si la requête que je suis en train de faire est réalisable car je n'arrive pas a solutionner l'erreur de syntaxe.
Il s'agit d'une requete utilisant 2 conditions
Code:
1 2
| USING onRoad.depart_id = departs.id,
passager_id = '".$_SESSION['passagerID']."' |
Code:
1 2 3 4 5
| $sql="SELECT onRoad.passager_id, onRoad.depart_id, onRoad.ville_depart, onRoad.province_depart, onRoad.pays_depart,
onRoad.point_depart, onRoad.province_destination, onRoad.ville_destination, onRoad.pays_destination,
onRoad.point_destination, id, DATE_FORMAT(heure_depart,'%H:%i') AS time_depart, DATE_FORMAT(date_depart, '%d/%m/%Y') AS date_fr,
places_disponibles FROM onRoad LEFT JOIN departs USING onRoad.depart_id = departs.id, passager_id = '".$_SESSION['passagerID']."'
ORDER BY departs.date_depart ASC, departs.heure_depart ASC"; |
merci de votre aide