Posted 28 May 2006 - 05:56 AM
Im trying to write a function that does the following:
I have a form which has items from a mysql database. At the moment when you click
on an item from the page and add it to a cart the items are being displayed in random order.
I want the items to be displayed in the order they are clicke on
Posted 28 May 2006 - 05:58 AM
Posted 28 May 2006 - 09:02 AM
You can add a new field called date, cointaining the timestamp of the order. Then, just use ORDER BY (MySQL).
Yes i thought about that, however what i belive will happen in that case is this:
Eveytime you go and add an item it will read the order the items are stored in
the database and display them according to how they are stored.
What i want to make sure is that whatever item(s) the user selects thats what
they will see in their list so that they are displayed in the order clicked.
I was thinking maybe:
1. Include MySQL query in PHP function to Store/Push them into an array as they are selected (Not sure how though)
2. Print the array to screen
3. ORDER by Category, Item
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users