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 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? 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 Link to comment https://forums.phpfreaks.com/topic/151849-solved-3-table-comparison/#findComment-797433 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.