select random ids from list

2006-07-31 Thread kalin mintchev
hi all... how can i do a query on a list of ids without doing individual queries for each one of them? something like: select id,title from content where id = 100,106,109; of course this doesn't work... is it possible somehow? thanks -- MySQL General Mailing List For list

Re: select random ids from list

2006-07-31 Thread Chris
kalin mintchev wrote: hi all... how can i do a query on a list of ids without doing individual queries for each one of them? something like: select id,title from content where id = 100,106,109; select id,title from content where id IN(10,20,30); -- MySQL General Mailing List For list

RE: select random ids from list

2006-07-31 Thread Quentin Bennett
. To: mysql@lists.mysql.com Subject: select random ids from list hi all... how can i do a query on a list of ids without doing individual queries for each one of them? something like: select id,title from content where id = 100,106,109; of course this doesn't work... is it possible somehow

RE: select random ids from list

2006-07-31 Thread Brian Fish
You could also use OR select id, title from content where id = 100 or id =106; Brian From: Quentin Bennett [EMAIL PROTECTED] To: [EMAIL PROTECTED],mysql@lists.mysql.com Subject: RE: select random ids from list Date: Tue, 1 Aug 2006 14:59:14 +1200 If you know the list of Ids, try select id

Re: select random ids from list

2006-07-31 Thread kalin mintchev
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?! -- MySQL

Re: select random ids from list

2006-07-31 Thread Michael Stassen
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