php - JOIN in MySQL and relational tables error -
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 However, the selected fields appear blank. I think this Here is an example of my member_food table: Dining table: 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;' '
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
Post a Comment