I have two tables, both with only one column.
Table 1: Merchants
Column: merchant (20 entries)
Table 2: Categories
Column: category (600 entries)
I'm trying to write a for each loop to select all entries within these two tables and list all possible combinations in this format. For example..
merchant1 category1
merchant1 category2
merchant1 category3... all the way to end of categories
merchant2 category1
merchant2 category2
merchant2 category3...all the way to end of categories
etc...
Should I use one mysql command to select the data, then use a for each loop?... or should I run 2 mysql commands and use a nested for each loop on multiple arrays?