On 02/14/2007 03:37 PM, Jon Baer wrote:
> Interesting question but this *would* seem to work ...
> 
> select id, categories from dd_categories where id in (21, 20, 13, 3, 22,
> 31) order by id = 21 desc;
> 
> Anyone else test, confirm or answer why?

id = 21 is evaluated to TRUE or FALSE and then sorted based on that.
_______________________________________________
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