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? Quote Link to comment https://forums.phpfreaks.com/topic/282197-new-help-with-a-join-statement/ Share on other sites More sharing options...
Solution Barand Posted September 16, 2013 Solution 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 Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.