September 14th, 2000, 02:17 AM
Hello guys, i'm a newbie to php, i just copy a sample code here which displays a records into a pages, but when i execute this code i got this error:
Warning: Supplied argument is not a valid MySQL result resource in DOCUMENT_PATH/file.php on line NUMBER
DOCUMENT_PATH = document tree of apache
NUMBER = the line number in the .php with error
any suggestion will be appreciated.
September 14th, 2000, 12:50 PM
Post the code itself, including the actual line number. that is the only way it can be effectively troubleshot.
September 14th, 2000, 08:01 PM
Sounds like you're not passing a valid result pointer into another php mysql function
$sql = "select whatever from summit";
$stuff = mysql_fetch_array($sql);
would give that error
more likely, you're using mysql_num_rows($result_pointer) when there is no data to count
as aarongb says post us a snippet of code (you don't have to post the whole app BTW)
[This message has been edited by Bealers (edited September 14, 2000).]