scmeeker Posted June 17, 2010 Share Posted June 17, 2010 I'm trying to join these two tables and its not pulling the information from the "product" table into the "store". I'm not able to access info I requested from the "product" table. Here is the code and hopefully you can help. I'm rather new to PHP and MySql so your help is very appreciated. Thanks!! $get_item_sql = "SELECT p.id, p.photo, p.username, p.title, p.date, p.location, p.store_id, s.store_id, s.username, s.store_name, s.location, s.news, s.websites FROM store AS s LEFT JOIN product AS p on s.store_id = p.id WHERE s.store_id = '".$_GET["store_id"]."'"; Quote Link to comment https://forums.phpfreaks.com/topic/205069-joining-two-tables-problem/ Share on other sites More sharing options...
scmeeker Posted June 17, 2010 Author Share Posted June 17, 2010 Resolved! I changed the s.store_id = p.id to s.store_id = p.store_id. Thanks anyway! Quote Link to comment https://forums.phpfreaks.com/topic/205069-joining-two-tables-problem/#findComment-1073498 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.