[snip] I'm running PHP 4.1.2 and MySQL 3.23.39. I have a simple query that works if I telnet into MySQL and run the query manually. If I try and use it in a PHP page, I get the "Supplied argument is not a valid MySQL result resource" error. However, if I take out the ORDER BY RAND() part from the query, it works in PHP.
Doesn't work: SELECT * FROM products WHERE sale_price IS NOT NULL ORDER BY RAND() LIMIT 3 Works: SELECT * FROM products WHERE sale_price IS NOT NULL LIMIT 3 Does anyone have any idea why this is happening? [/snip] Need to see your PHP code, that's where it's broken. Jay sql, mysql, query :^) --------------------------------------------------------------------- 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