kalin mintchev wrote:
select id,title from content where id IN(10,20,30);

cool thanks..  what if i want it to be random ordering like:

select id,title from content where id IN(20,10,30);

and i would like the order of the ids and the in() to be kept in the
result array. what 'order by' would i use?!

  SELECT id, title
  FROM content
  WHERE id IN (20,10,30)
  ORDER BY FIELD(id, 20, 10, 30);

<http://dev.mysql.com/doc/refman/4.1/en/string-functions.html>

Michael

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to