phrozenfire Posted January 23, 2007 Share Posted January 23, 2007 Hi, I think there's probably an easy way to do this, but its got me a little confused.I would like to Run a query, which selects two tables, Callbacks and TicketsSold.Then I'd like to display the contents of Callbacks, where the cartID = cartID in TicketsSold, and where MC_EventDate equals either:Saturday 9th DecemberSunday 10th DecemberSaturday 16th DecemberSunday 17th DecemberSaturday 23rd December.I will have 5 seperate pages, so I can hard code the date into the query, but am struggling on how to put the query togther to get the necessary results. Do I need to run seperate queries on the tables then merge them somehow?I have PHP version 4.4.2 and MySQL version 4.1.21-standard if that makes a differenceMany thanks for any pointers. Link to comment https://forums.phpfreaks.com/topic/35400-2-tables/ Share on other sites More sharing options...
linuxdream Posted January 23, 2007 Share Posted January 23, 2007 A query like:"SELECT c.*, t.* FROM TicketsSold t, Callbacks c WHERE t.cartID = c.cartID AND t.MC_EventDate = '$date';Will have to change names and maybe table order depending on how your data is..but that should work ok. Link to comment https://forums.phpfreaks.com/topic/35400-2-tables/#findComment-167421 Share on other sites More sharing options...
phrozenfire Posted January 23, 2007 Author Share Posted January 23, 2007 Thanks Link to comment https://forums.phpfreaks.com/topic/35400-2-tables/#findComment-167462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.