"This is kind of interesting ...

$query="SELECT * FROM quiettimequotation WHERE used = 0 ORDER BY RAND()
LIMIT 1";

works;

$query="SELECT * FROM bibleverses WHERE 'used' = 0 ORDER BY RAND() LIMIT
1";

doesn't!  Having the ' around used makes that select command fail ---
but
the UPDATE command requires it!"

Use the "`" mark around table names and field names.
Use the "'" mark around values.
Although sometimes you may get away without them.

$query="SELECT * FROM `bibleverses` WHERE `used` = '0' ORDER BY RAND()
LIMIT 1";

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

Reply via email to