nesting repeat region
In the db I have a table 'productmanufacturers' which is used to select a ManufacturerName and add it to the table.
Then, I have a table 'download' which creates a dropdown and populates it with the ManufacturerName above into the column 'DownloadManufacturer' within the 'download' table.
On the front end, I am creating a repeat region which lists out all the values from table 'productmanufacturers' column 'ManufacturerName'
$Downloads = new WA_MySQLi_RS("Downloads",$DBConnection,0);
$Downloads->setQuery("SELECT * FROM productmanufacturers WHERE Live = 1 ORDER BY ManufacturerName ASC");
<h2 class="downloadTitle"><?php echo($Downloads->getColumnVal("ManufacturerName")); ?></h2>
$Downloads->moveFirst(); //return RS to first record
so far so good.....
Now what I am trying to achieve is another repeat region within the above that, if 'DownloadManufacturer' from table 'download' is equal to 'ManPermalink' from table 'productmanufacturers' then it lists the records from 'download' in that repeat.
Am not sure what I need to do (either rs wise or nested repeat itself) - dont know if I can use the same rs Downloads and if so, how to structure the SELECT statment or if I need to create a new RS completely for the nested repeat but if thats the case, how to create the SELECT so that it is 'linked' to the original