On 02/14/2007 05:14 PM, Jon Baer wrote:
> Interesting how you can walk down the entire list to produce the order
> you need like that.

Yes, and to elaborate a bit more from my earlier post, you could put the
series in the FIELD() and then sort strictly from that.


SELECT
        id, categories
FROM
        dd_categories
WHERE
        id IN (21, 20, 13, 3, 22, 31)
ORDER BY
        FIELD(id, 21, 20, 13, 3, 22, 31);


_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to