alanChurley Posted March 31, 2009 Share Posted March 31, 2009 ok, i have the following sql statement; Code: SELECT data.mobilenumber, data.firstname, bookedparties.partydate, bookedparties.partyguests, clubs.brand FROM data, bookedparties, clubs WHERE data.contactid = bookedparties.contactid AND bookedparties.club = clubs.club AND bookedparties.partydate = '2009-03-30' AND bookedparties.canceled = '0' AND data.gender = 'F'; When i run the statement, it only selects those that match records that match one of the clubs.club I really don't know where to start or if I'm being really stupid - any help is greatly appreciated MySQL 5.0.45 via TCP/IP Quote Link to comment https://forums.phpfreaks.com/topic/151849-solved-3-table-comparison/ Share on other sites More sharing options...
corbin Posted March 31, 2009 Share Posted March 31, 2009 "AND bookedparties.club = clubs.club " Errr yeah... That's what you're telling it to do? Perhaps you want a LEFT JOIN? Quote Link to comment https://forums.phpfreaks.com/topic/151849-solved-3-table-comparison/#findComment-797397 Share on other sites More sharing options...
alanChurley Posted March 31, 2009 Author Share Posted March 31, 2009 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/151849-solved-3-table-comparison/#findComment-797433 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.