villain222 Posted May 29, 2011 Share Posted May 29, 2011 can someone, somewhere tell me what's wrong with this query? "SELECT items.*, image.imageid, image.imagename, tickets.item, tickets.paypal, tickets.amount FROM (items LEFT JOIN image ON items.imageid = image.imageid) LEFT JOIN tickets ON tickets.item = items.id WHERE items.id = $ticketItem" double checked all table labels, is the order wrong here? can I use the specific rows or do i need to use the generic (*) for all on all 3 tables? Quote Link to comment https://forums.phpfreaks.com/topic/237751-3-ways/ Share on other sites More sharing options...
ignace Posted May 29, 2011 Share Posted May 29, 2011 Try that: SELECT items.*, image.imageid, image.imagename, tickets.item, tickets.paypal, tickets.amount FROM items LEFT JOIN image ON items.imageid = image.imageid LEFT JOIN tickets ON tickets.item = items.id WHERE items.id = $ticketItem Quote Link to comment https://forums.phpfreaks.com/topic/237751-3-ways/#findComment-1221777 Share on other sites More sharing options...
villain222 Posted May 29, 2011 Author Share Posted May 29, 2011 Thanks ignace. That worked fine. mine might have worked, but as i was putting yours to test i realized why the one page i was using wasn't finding the variables. either way, it works now. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/237751-3-ways/#findComment-1221779 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.