[nycphp-talk] OT: Random MySQL question
Flavio daCosta
nyphp at n0p.net
Wed Feb 14 15:51:24 EST 2007
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.
More information about the talk
mailing list
Automatic Email Organization without missing anything!