Hi,
> -> DAY) >'$tdate' and city.id=special.cityid order by RAND() limit 1;
> ERROR 1064: You have an error in your SQL syntax near 'RAND() limit 1' at
> line 3
>
> select version();
> +-----------+
> | version() |
> +-----------+
> | 3.22.32 |
> +-----------+
>
> What could be the problem
order by rand() didn't work back in 3.22.
if i remember correctly (if this doesn't work, you can try to search
the list archives), the workaround was:
SELECT col1,col2,RAND() as r FROM table ORDER BY r LIMIT 1;
Rgds,
Tfr
--==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia >==--
---------------------------------------------------------------------
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