you can use order by rand()...

example if i want to pic a random picture from photos table:

$resultrandom = mysql_query("SELECT pictures FROM photos_table ORDER
BY RAND() DESC");


Regards,
Hendra
www.papanbuletin.com

On 4/21/05, Marian Briones <[EMAIL PROTECTED]> wrote:
> 
> 
> How can I randomly select a record from an MySQL query?  I'm doing a
> self-driven membership website where the user will have to identify
> the characters in graphics in order to continue registration.
> 
> How can I do this?
> 
> (The answers are out there)
> 
> Community email addresses:
>  Post message: [email protected]
>  Subscribe:    [EMAIL PROTECTED]
>  Unsubscribe:  [EMAIL PROTECTED]
>  List owner:   [EMAIL PROTECTED]
> 
> Shortcut URL to this page:
>  http://groups.yahoo.com/group/php-list
> Yahoo! Groups Links
> 
> 
> 
> 
>


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to