XboxUnlimited
Active member
Hi, I need to get data from multiple database tables and display them in the same template, not sure of the best way of going about it.
I have DB table1
Table 1
Table 2
So I need to get the productID from table 1 and find the matching productID in table 2 and display the productOptions from table 2, there are multiple options in table 2 for the same productID so I need to loop through and list all the matching productOptions.
I was thinking of maybe a foreach loop within a foreach loop or something like that, not sure if that would work in XF.
Any suggestions of the best way of doing this? I'm sure it's simple once you know how.!!
I have DB table1
Table 1
- productID
- descriptions
Table 2
- productID
- productOptions
So I need to get the productID from table 1 and find the matching productID in table 2 and display the productOptions from table 2, there are multiple options in table 2 for the same productID so I need to loop through and list all the matching productOptions.
I was thinking of maybe a foreach loop within a foreach loop or something like that, not sure if that would work in XF.
Any suggestions of the best way of doing this? I'm sure it's simple once you know how.!!