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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.