Some advice needed for Data Bridge
I saw a tutorial from WA with regards to joining the contents of a database, but I can't for the life of me find it now, and apart from being different subject matter, it looked to achieve exactly what I need.
I have a page with a master recordset and a child recordset. This master recordset will hold the unique IDs to return content for related child recordset. This related content is in another DB table, and it is a table with five or six promotional records in it; the administrator can choose to apply a promotion to multiple records from the master table.
So, I am trying to achieve this:
Pull in content to a page from a master record which in turn triggers the content for the child record which is the promotional content. This master record has loads of columns, one of which holds the unique ID of the related promotion.
Now, if I structure my SQL like this, it only returns the first promo record from the results regardless of the promo ID entered into the master record column:
Default value: -1
Runtime value: $_GET['tbl_master.fld_promoRELATED']
SELECT * FROM tbl_promo JOIN tbl_master ON tbl_master.fld_promoRELATED = tbl_promo.fld_promoID WHERE tbl_master.fld_promoRELATED = promovar
If I use a default value of 3 for example, then the promo record with ID 3 is returned. Basically, the results aren't displaying dynamically. The info in the master record is effectively being ignored. Somewhere a variable is missing that should match that of the master record in order to return the promo record, and it's here that I am stuck :(
Does this make sense? If so, how can I achieve this with Data Bridge?