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