>I have a couple of scripts that fail with the error of: >Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result >resource in... > >I'm new to both SQL and PHP and I'm wondering if I have some setting >turned off or what. > >Here's the piece of code that is failing (the second line fails): > >$result = mysql_db_query($dbname, "SELECT * FROM tablename ORDER BY id");
if (!$result){ error_log(mysql_error()); } > $row = mysql_fetch_array($result); Re-load, and go check your Apache error log. If you can't find your Apache error_log, just use "print" instead of error_log, but that's not good to have on a public web-site for your internal errors. Exposes too much info to potential abusers. -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php