Hi people,

I was approached by my boss today to construct a page to draw out the data
from a recent survey that was conducted via the web. The data is stored in a
mysql database by fieldname and the data that the user entered.

The problem lies in the way that he wants the page constructed.

The page is split into two sections that in essence build the structure of
the sql query. At the top of the page there are a number of checkboxes that
will both have a variety of fieldnames associated with them. ie if the
checkbox is checked then there are a number of fieldnames to be included
into the query. These can be checked in any number of ways to include a
different query each time. While I can work out a way to do this, the
problem comes when I retrieve the results from the database. I set the query
to draw out the required information from the database with no problems.
However by using a mysql_fetch_row statement I hit a wall. How do I write
the statement to reflect the query statement?

ie if the query can be:

select field1,field2,field3 from database where data = "test"

select field4,field5,field6 from databse

select field1, field4, field6 from database where data = "test"

I think you can see the pattern here.

Subsequently the displaying of the results will also be affected in the same

There is a second area of the form that I can solve by using a different
<form> tag, but the same problem will arise here.

Any help on this would be greatly appreciated.

Thankyou in advance.


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to