Okay, let me put the issue into context.
I have two queries in my php. The first gives the details which power the second.
I'm wanting to create a HTML email using TBS to present the recipient with a list of people.
For example:
Dear person 1,
Here are your friends:
<!-- start outputting the results of query 2, either from
the array, or straight from the db //-->
* person 2
* person 3
* person 4
<!-- repeat this bit until query 2 is exhausted. //-->
|
In order to achieve this, I have my code structured as follows:
1. Query 1, retrieve Person 1 from 'USER' table
2. Query 2, retrieve Person 2 from 'USER' table where Person 1 occurs.
3. Add current results of query 2 into the TBS template
4. Repeat Step 2 until Query 2 is finished
5. Output the template here.
6. Repeat Step 1 until Query 1 is finished.
|
The problem I am experiencing is finding a way of getting TBS to output the current row results of step 3 into my current template.
I want it to build up an array, or something similar, then as it's building it up, it spits it out in my TBS HTML Template.
Like this;
1. Query 1 gives person_id_1 = 1
2. Query 2 gives person_id_2 = 2 (STEP X)
2a. Add this current row result into the TBS HTML template.
3. Repeat 2 until query 2 is exhausted, (STEP X = STEP X + 1)
4. Repeat 1 until query 1 is exhausted.
|
In summary, all I want to do is have an E-mail which collects all the results of query 2, dump this data into my TBS HTML template.
(See top example)
The only way I can think of doing it is via arrays, but I'd appreciate any help you can give with this.
Thanks.