Re: random select

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thankyou that seemed to work well.


----- Original Message -----
From: "Jason Wong" <php-db@gremlins.biz>
To: <php-db@lists.php.net>
Sent: Tuesday, December 17, 2002 9:32 PM
Subject: Re:  random select


> On Tuesday 17 December 2002 18:46, Bruce Levick wrote:
> > Bruce Levick - VivamotionI was curious as to what is the best way to
select
> > a random row from a table in my database.
> >
> > I have currently five rows and will be expanding on that as well. I have
> > tried this code.
> >
> > ########################################################################
> > //retrieve random row
> > <?php
> >  $rndm = mysql_query("SELECT * FROM Illustrations ORDER BY RAND() LIMIT
>
> You need to use one of the mysql_fetch_*() functions. Details and examples
in
> manual.
>
> >  but am not getting anything when output with PHP in a browser. I am
> > working off localhost on a WINXP machine. PHP 4.2.2.
>
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
>
> /*
> "Ain't that something what happened today.  One of us got traded to
> Kansas City."
> -- Casey Stengel, informing outfielder Bob Cerv he'd
>    been traded.
> */
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux