[nycphp-talk] OT: Random MySQL question
Adrian Noland
anoland at indigente.net
Thu Feb 15 23:01:16 EST 2007
Thanks. This is precisely what I needed.
On 2/14/07, Flavio daCosta <nyphp at n0p.net> wrote:
> 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
>
More information about the talk
mailing list