Hi,
I have been trying this on my localhost and this works
select special.contid, special.cityid, special.curr1, special.catalogo,
special.hf, special.curr2, special.vitofferta, special.fh, special.club,
special.stars, city.city from special,city where
DATE_SUB(special.periodo, INTERVAL 3 DAY) >'$tdate' and
city.id=special.cityid order by RAND() limit 1
My version
+------------------+
| version() |
+------------------+
| 3.23.22-beta-log |
+------------------+
but the same sql statement on my online server does not work.
select special.contid, special.cityid, special.curr1, special.catalogo,
-> special.hf, special.curr2, special.vitofferta, special.fh,
special.club,
special.stars, city.city from special,city where
DATE_SUB(special.periodo, INTERVAL 3
-> 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
Adrian
---------------------------------------------------------------------
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