Hello,

there is no difference between

select id, name from table where id in (5,3,7)
and
select id,name from table where find_in_set (id, "5,3,7");

Or I didn't see it... anyway this doesn't solve my problem.

Mickael

On Friday 22 March 2002 11:32, Georg Richter wrote:
> On Friday, 22. March 2002 10:43, Mickael Bailly wrote:
> > Hello !
> >
> >  I got a table having an auto_increment field, let's say 'id'. tis table
> > has a varchar field too, let's say 'name'.
> >
> > Is there a way to do something like:
> >
> > select id, name from table where id in (5,3,7)
> >
> > AND that mysql orders the results the way I gave into the 'IN(...)'
> > clause ?
>
> Hi Mickael,
>
> you can use the find_in_set function e.g.
> select id,name from table where find_in_set (id, "5,3,7");
>
> But you can't order them in the order specified in set.
>
> Regards
>
> Georg
>
> Only for the spam filter: mysql rulez!
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
NetClub'ment votre,
Mickael Bailly

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to