php - MySQL join query appears to be valid but not performing as expected -


I am relatively new to using MySQL to connect.

I have two tables:

  sh_subscriptions => ID = & gt; user_id = & gt; feed_id sh_feeds = & gt; ID = & gt; shop_name = & gt; feed_id   

I am trying to get all the fields from sh_subscriptions where feed_id to feed_id Matches sh_feed s that matches the $ line ['shop_name'] and where matches user_id $ id ['id] .

Here's my attempt:

  Select- from sh_subscriptions INNER JOINT_SET_ID = SHAnFeads on f.feed_id. JOER s.id = '' $ Id ['id']. '' And F. Shop_name = ''. $ Line ['store_name']   

UPDATE

I now have the following:

  while ($ row = mysqli_fetch_array ($ Query)} {echo "
;); Echo ['shop_name'] "" per line; $ Query = mysqli_query ($ con, "SELECT * sh_subscriptions Join INNER sh_feeds f at s.feed_id = f.feed_id WHERE s.user_id = '" $ id [' id '].' 'And f.shop_name =' ". $ Line ['store_name']. "'") Or die (mysql_error ($ con)); echo "& lt; / div> ";}

I can confirm that the database fields are all present and the variables are printing properly, but despite an error handler joining, div is nothing inside.

Try it: SELECT * INNER S.id = f.feed_id where SID = ''. $ Id ['id']. '' And F. Shawla_name = ''. $ Line ['store_name ']. "'") Or die (mysql_error ($ con));

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -