Welcome Guest, Not a member yet? Register   Sign In
Table with variable columns
#6

[eluser]sholnay[/eluser]
Well, I think that is as easy as setting up your query dynamically based on what the user has clicked.

In your select statement - you would build the data that you want to show BASED on those checkboxes.

So if the user checked 'category' and 'style' for instance, you would build the query like this:

SELECT category,style FROM devices
WHERE the data matches the criteria.

You could also SELECT * and then when you're processing the data for display - use some logic to filter for only what the user chose (using the posted data from the form).

I think filtering at the query level would be more efficient though.

Am I still off target here?


Messages In This Thread
Table with variable columns - by El Forum - 05-22-2008, 01:00 PM
Table with variable columns - by El Forum - 05-22-2008, 01:46 PM
Table with variable columns - by El Forum - 05-22-2008, 01:50 PM
Table with variable columns - by El Forum - 05-22-2008, 02:57 PM
Table with variable columns - by El Forum - 05-22-2008, 03:03 PM
Table with variable columns - by El Forum - 05-22-2008, 03:36 PM
Table with variable columns - by El Forum - 05-24-2008, 09:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB