sorting 'recently viewed' items
(Not strictly a PHP question, but as yet, there is no MySQL section in General Topics)
further to my post on another thread, i have a recordset of items which is using an array as its filter criteria.
the array is populated from the last few items viewed, I then loop through the array, so that the resultant query is something like this..
SELECT DISTINCT... FROM tblitems WHERE ItemID = 3 OR ItemID = 14 OR ItemID = 8 OR ItemID = 47 OR ItemID = 22
The itemID's are in the order in which they are added to the array.
What I haven't worked out is how to sort the resulting recordset, so that the row order reflects the input parameters.
can anyone advise ?