> I have a question
> I have to select a group of person i.e
> $query = "SELECT * FROM table WHERE id = <10";
> 
> my question is that can we order order in random mode?? or do we have to
> program it in php
> 
> any help is appreciated

Not a PHP question, but if you're using MySQL version 3.23.2 or later, and
you only want to return one random result you can use:

$query = "SELECT * FROM table WHERE id<10 ORDER BY RAND() LIMIT 1";

I don't know if that works without the LIMIT clause; give it a try.

HTH

--
Lowell Allen

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

Reply via email to