matt.sisto Posted May 6, 2009 Share Posted May 6, 2009 I want to be able to see the relevant client_id associated with each event (booking) from my query, but MySQL doesn't like it. How can I SELECT the client_id along with everything else? $sql = "SELECT event_id, event_start, event_end, service_id, unit, quantity, fee FROM calendar_events CROSS JOIN client USING (client_id) WHERE calendar_events.event_start >= '".$invoice_start."' AND calendar_events.event_end <= '".$invoice_end."' AND client.org_id = '".$org_id."'"; Any help is appreciated. Thanks and regs. Quote Link to comment https://forums.phpfreaks.com/topic/157087-how-can-i-use-the-client_id-from-my-cross-join-query/ Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 client_id from which table? Quote Link to comment https://forums.phpfreaks.com/topic/157087-how-can-i-use-the-client_id-from-my-cross-join-query/#findComment-827466 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.