[SQL]Combine three tables into one when viewing

Wamphyri

New Member
I have three tables as seen in this image and I want to present it as seen in the last table.I cant figure out how to solve it, right now I'm using three nestled calls to display it. First I loop trough Customers to display all of them. Inside this loop I have a loop that goes trough OrderCustom and inside that I check if there is an CustomerOrderCustom with the right Customer_id and OrderCustom_id. Not only am I using a lot of queries but the view shows OrderCustom items that now Customer are using, in this case Zip Code.I'm using MySQL 5
2cyi17b.png
 
Top