SocomNegotiator Posted July 24, 2008 Share Posted July 24, 2008 I am having problems with this sql query... <?php $db->query('SELECT item.id, item.name, item.description, pre_order.id, pre_order.amount, pre_order.user_id FROM `pre_order` LEFT JOIN `item` ON pre_order.item_id = item.id WHERE pre_order.user_id='.$user_id) or die(mysql_error()); while($row = $db->fetch_array()) { }?> Now with my while I should be able to say $row['name'] or $row['item.name'], but it is not working...do I have an error in my join? Any help would be much appreciated. Link to comment https://forums.phpfreaks.com/topic/116316-mysql-left-join-problem/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.