Re: ORDER BY RAND()....

From: Date: Wed, 29 Oct 2003 20:28:17 +0000
Subject: Re: ORDER BY RAND()....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-168060@lists.php.net to get a copy of this message
Ok, this gives me an error. I guess what I was asking early is there away to print an echo without doing myrow? Why can I do echo $result without getting Resource id # My thinking is if you look at my first e-mail, my code is trying to fetch multi-rows from the database, I don't need multi row, I thinking becaue fetch calls the database multi time that it defects the rand() function. Payne Chris W. Parker wrote:
Payne <mailto:payne@magidesign.com> on Wednesday, October 29, 2003 11:54 AM said:
Try -> SELECT url FROM sponsors ORDER BY RAND() LIMIT 1;
     
I did that same thing.
SELECT url FROM sponsors ORDER BY column RAND() LIMIT 1; How about that one? Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/


« previous php.general (#168060) next »