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

[eluser]sholnay[/eluser]
I'm pretty sure this would not be the optimal solution but:

It appears that you will let people choose features of a phone - and then return the phones that match those criteria. An easy solution would be to have a Phones table and in the table you would have a column for every criteria category you have on your page. In other words, Category, Manufacturer, touch screen, etc. Your query is going to be built dynamically every time you submit the page.

From there - its pretty easy to use the submitted data to weed out the phones.

SELECT phones
WHERE category IN ( list,the,categories,the,user,chose )
AND manufacturer IN ( another,list,here )
AND qwerty = 'true'
etc..

not sure if you're using the active record etc - but you can probably get the gist of the query you would build.

Am I missing the target of what you want to do here? (I apologize if I am hehe)


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