Try
("select field 1, field2, field3, rand() as rnd
where blah blah blah
order by rnd limit 1")
On Saturday 08 December 2001 10:35 am, [EMAIL PROTECTED] wrote:
> Hi,
>
> I am trying to pull up one random name in mysql 3.22.21 but not having much
> luck.
> Here is what I have done:
> $select=$dbh->prepare("select * from $thetable where url is not null order
> by rand() limit 1");
> I have tried everything, but nothing seems to work. Can anyone help.
>
> Rob
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php