[PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
Hi, I have been working on a simple PHP script that called to a mysql database, where I do the following SELECT url FROM sponsors ORDER BY RAND(); When I do a refresh I keep getting the same url, I have test this sql statement in mysql and it works great. I think my problem is this...

Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Gerard Samuel
On Wednesday 29 October 2003 02:24 pm, Payne wrote: Hi, I have been working on a simple PHP script that called to a mysql database, where I do the following SELECT url FROM sponsors ORDER BY RAND(); Try - SELECT url FROM sponsors ORDER BY RAND() LIMIT 1; -- PHP General Mailing List

Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
Gerard Samuel wrote: On Wednesday 29 October 2003 02:24 pm, Payne wrote: Hi, I have been working on a simple PHP script that called to a mysql database, where I do the following SELECT url FROM sponsors ORDER BY RAND(); Try - SELECT url FROM sponsors ORDER BY RAND() LIMIT 1; I

RE: [PHP] ORDER BY RAND()....

2003-10-29 Thread Chris W. Parker
Payne mailto:[EMAIL PROTECTED] 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

Re: [PHP] ORDER BY RAND()....

2003-10-29 Thread Payne
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