Hi Bob,
I am looking for some advice and directions. I need to run an sql against some tables and UNION the data like in:
I see two alternatives:
a) I could write some php code to extract the data but in this case I am not sure how to merge this code into CF so that I do not loose the benefits of this component;
b) I could write a stored procedure in MySQL and call it from the load event. But in this case I do not know if it is possible and how I should make call.
Your advice would be appreciated.
Thanks,
adop
I am looking for some advice and directions. I need to run an sql against some tables and UNION the data like in:
SELECT id from ...
UNION
SELECT id from ...
UNION
SELECT id from ...
The simplest way to do it would be to use a DB multi-record loader for each SELECT. The problem is that the number of tables to query is not fixed. So ideally I would like to be able to select the tables (with another SELECT statement) that have to be queried first and than run the SELECT statements.I see two alternatives:
a) I could write some php code to extract the data but in this case I am not sure how to merge this code into CF so that I do not loose the benefits of this component;
b) I could write a stored procedure in MySQL and call it from the load event. But in this case I do not know if it is possible and how I should make call.
Your advice would be appreciated.
Thanks,
adop