[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-db
Subject:    Re: [PHP-DB] How to  randomly select data in a field. Please help newbie.
From:       "Johannes Janson" <johannes.janson () gmx ! de>
Date:       2001-04-30 11:56:48
[Download RAW message or body]

Hi,

you could do the random selection in MysSQL if you use it
using a query like this.
SELECT  FieldWithURL FROM YourTable ORDER BY RAND() LIMIT 0,1;
This will give you a random field. If you want more fields you have to
set different values for the limit. Like LIMIT 0,5 for the first 5 row.
Just if you don't know the syntax of LIMIT: limit 'StartingPoint',
'NumberOfRows'

hope it helps
Johannes

""Greg K"" <gkelly455@ameritech.net> schrieb im Newsbeitrag
news:9cfe9n$ggd$1@toye.p.sourceforge.net...
> Can someone explain to me the best way to randomly select data from field
> that consist of urls. The fields consist  urls that  are images of people.
I
> believe I have to setup that field as a array and turn it into a interger.
> But I have no experience doing this can someone sort of give me a example
on
> how I would do this .
>
> Thank you ..
>
> Your Help would be well appreciate it ..
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic