spertuit Posted September 16, 2013 Share Posted September 16, 2013 So I have a left join "SELECT * FROM `dailyMasterLogs` AS logs LEFT JOIN `vessels` AS vessel ON ( logs.logVesselID = vessel.vesselName) ORDER BY $field $order" This works, but I need to add in a where clause on the logVesselID. I want to select all from the dailymasterlogs where logvesselid = foo as logs, but thats not working. Any help on this? Link to comment https://forums.phpfreaks.com/topic/282197-new-help-with-a-join-statement/ Share on other sites More sharing options...
Barand Posted September 16, 2013 Share Posted September 16, 2013 SELECT * FROM `dailyMasterLogs` AS logs LEFT JOIN `vessels` AS vessel ON logs.logVesselID = vessel.vesselName WHERE logs.logVesselID = foo ORDER BY $field $order Link to comment https://forums.phpfreaks.com/topic/282197-new-help-with-a-join-statement/#findComment-1449745 Share on other sites More sharing options...
spertuit Posted September 16, 2013 Author Share Posted September 16, 2013 Thanks a million, I thought I had tried this, but must have missed it somehow. I appreciate the help! Link to comment https://forums.phpfreaks.com/topic/282197-new-help-with-a-join-statement/#findComment-1449748 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.