RON_ron Posted November 23, 2012 Share Posted November 23, 2012 I'll getting data from two different databses. Code A is the current code (works well). After doing some modifications (Code B), now the code outputs nothing . Could someone help to correct the error in Code B? Code A $query = "SELECT * FROM furniture LEFT OUTER JOIN furnitureBrands ON furniture.itemCode = furnitureBrands.theName ORDER BY furniture.key DESC; $results = mysql_query($query); Code B $query = "SELECT * FROM furniture LEFT OUTER JOIN furnitureBrands ON furniture.itemCode = furnitureBrands.theName WHERE furniture.checked = '0', furniture.availability = 'yes' ORDER BY furniture.key DESC; $results = mysql_query($query); Thanks. Link to comment https://forums.phpfreaks.com/topic/271061-left-outer-join/ Share on other sites More sharing options...
Barand Posted November 23, 2012 Share Posted November 23, 2012 A look at the value of mysql_error() helps in these circumstance. Do that,then try $query = "SELECT * FROM furniture LEFT OUTER JOIN furnitureBrands ON furniture.itemCode = furnitureBrands.theName WHERE furniture.checked = '0' AND furniture.availability = 'yes' ORDER BY furniture.key DESC"; Link to comment https://forums.phpfreaks.com/topic/271061-left-outer-join/#findComment-1394567 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.