php - JOIN in MySQL and relational tables error -


itemprop = "text">

I have three tables, "food", "member" and "member_food". I'm trying to create an updated user page, where a collection of tags are populated based on the data of "member_food".

I want to query debug the last page which is being sent from the login page which allows me to choose, then id: 4

 Select  $ query = "* food` food.entityid = member_food.food_id Where to join member_id at member_food`. = '$ Id'"; // breakfast $ breakfastresult1 = $ mysqli- & gt; Query ($ query); Echo '& lt; Select name = "breakfast 1" & gt; '; While ($ BreakfastData1 = mysqli_fetch_array ($ breakfastresult1, MYSQL_ASSOC)) {echo '& lt; P & gt; & Lt; Option value = "'. Html_specialchars ($ BreakfastData1 [' member_food.food_id ']).' '& Gt;' htmlspecialchars ($ BreakfastData1 ['member_food.food_name']). '& Lt; / options & gt;' ' 

However, the selected fields appear blank. I think this Here is an example of my member_food table: Enter image details here

Dining table:

it Edit here

edit it, first you have a typo) Tell RAY that the member_ide is related to which table

  $ query = "From the selection * from the meal * join the 'F' to say 'member_food` with mfentityid = mf.food_id mf WHERE mf.member_id = '$ id' ";  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -