Hi all, i've been pondering with an idea for my system to allow the user to make reports depending on what he needs. His input screen will be a series of select options corresponding to the table columns. There will be the same number of select statements on screen as there are tables / columns in my database.
e.g
Table 1 = id, date, age (etc.....)
Table 2 = make model (etc....)
-----
-----
Table N = etc
________________________
Table1
select1 select2 select3
Table2
select4 select5
etc.
so the user can add really any number of these say up to 30(although will never get a report with this amount but keeps options open).
The problem i can foresee is in using mysql ( SELECT (for($i=1, $i<=30, i++) etc. if i can get this working it will mean i would not have to hard code say even up to 10 queries.
As I am new to this programming in PHP and mySQL i was wondering if anyone could point me in the right direction as i feel php code cannot be used within sql code.
I am using PHP 5 with HTML.
Any help in this matter is much appreciated as it is the last thing i have to do so i can finish my project :)