Hello everyone.
I am trying to get some data from 2 mysql tables and loop the results. I have a LEFT JOIN ON statement that works and when I loop table1 it works as well. I have table2 which contains subdata for table1 and can have multiple records tied to table1 .
I can't figure out how to loop table2 results with table1. Currently it creates a new html table for each table1 + table2 result.
I'm pretty new to this so I hope it makes sense.
Example (What's happening that I don't want.)
(Table1) Data
(Table2) Test
(Table1) Data
(Table2) Test2
(Table1) Hello
(Table2) Good
(Table1) Hello
(Table2) Bye
Example (What I want)
(Table1) Data
(Table2) Test
(Table2) Test2
(Table1) Hello
(Table2) Good
(Table2) Bye