Solarpitch Posted January 10, 2007 Share Posted January 10, 2007 Hey Guys, In my application I have a "quicklist" which stores a few id's of products on the site. Each product the user selects will be added to this quicklist variable.ie $quicklist[] = {4,5,42,6,17,64} --> each id is a reference to a product.I want to be able to give the user the option of saving the quicklist to the database for later viewing. So I want to sore all the id's the user has selected . . {4,5,42,6,17,64}. Then when the user wishes to view his/ her quicklist, I can pull them from the DB and display in a table.How could I achieve this?Cheers,Gerard. Quote Link to comment Share on other sites More sharing options...
fenway Posted January 10, 2007 Share Posted January 10, 2007 Well, using an IN() clause, you could easily pull them back, especially if you store it with commas already. Not that I condone storing lists of values in database fields, but as long as you never want them to be able to edit a quicklist, I might make an exception. Quote Link to comment Share on other sites More sharing options...
Solarpitch Posted January 10, 2007 Author Share Posted January 10, 2007 Would there be any other way of doing it . . something I am missing? Quote Link to comment Share on other sites More sharing options...
fenway Posted January 10, 2007 Share Posted January 10, 2007 Well, with a many to many relationship table, you could link user to checklist to checklist item. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.