Is there a way I can return a set of mySQL rows in the order they’re called. For instance, when I call this:
SELECT * FROM heroes WHERE id IN ( 41 , 48 , 38 , 14 , 47 , 44 ) LIMIT 6
I’d like the rows returned in that order. Is there a php function I could apply to the results afterward to achieve this ordering?
Yes, take a look at “Ordering by the order of values in a SQL IN() clause” answers.
The solution is very well described there.