RE: Selecting random rows with MySQL 3.22?

2001-03-19 Thread Ravi Raman
iling List; Ravi Raman Subject: Re: Selecting random rows with MySQL 3.22? Hi, > for mysql < 3.23 you can do something like this. > > select ID, ID*0+rand() as rand from partner order by rand limit 1 Thanks a million for the speedy response! It works like a charm! I don't q

Re: Selecting random rows with MySQL 3.22?

2001-03-19 Thread Chris Boot
Hi, > for mysql < 3.23 you can do something like this. > > select ID, ID*0+rand() as rand from partner order by rand limit 1 Thanks a million for the speedy response! It works like a charm! I don't quite understand how it works though... Could anyone explain? I really don't like knowing som

RE: Selecting random rows with MySQL 3.22?

2001-03-19 Thread Cal Evans
It has been. Check the archives for 2-3 weeks ago. Cal http://www.calevans.com -Original Message- From: Chris Boot [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 2:16 PM To: MySQL Mailing List Subject: Selecting random rows with MySQL 3.22? Hi, I'm sure this has

RE: Selecting random rows with MySQL 3.22?

2001-03-19 Thread Ravi Raman
dom rows with MySQL 3.22? Hi, I'm sure this has been covered before, so I'm sorry for repeating the question. A search of the list archives yielded nothing. What I need to do is grab one random row from a table. What I would do in MySQL 3.23 is: SELECT * FROM fid_links WHERE feature

Selecting random rows with MySQL 3.22?

2001-03-19 Thread Chris Boot
Hi, I'm sure this has been covered before, so I'm sorry for repeating the question. A search of the list archives yielded nothing. What I need to do is grab one random row from a table. What I would do in MySQL 3.23 is: SELECT * FROM fid_links WHERE featured='yes' ORDER BY RAND() LIMIT 1 How