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. Quote 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 (edited) 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"; Edited November 23, 2012 by Barand Quote Link to comment https://forums.phpfreaks.com/topic/271061-left-outer-join/#findComment-1394567 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.