Why not just get a random number in PHP and do a select statement like 
that?  IE

SELECT ID, city FROM data.cities WHERE country = 'CA' and ID = rand()


At 02:52 PM 5/7/2002 +0200, andy wrote:
>Hi there,
>is it possible to get mysql to return a record out of a table on a random
>I tryed:
>select rand() ID, city
>from data.cities
>where country = 'CA'
>but does not work though. Has anybody an idea? I tryed also to read all
>results and do the random thing with php, but this does take forever (doing
>it for a couple of times)
>Thanx, Andy

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to