Jump to content

Joining two tables problem


scmeeker

Recommended Posts

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"]."'";

 

Link to comment
https://forums.phpfreaks.com/topic/205069-joining-two-tables-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.