Jump to content
xisto Community
Cookiemonster1405241499

Help Needed With MySQL_fetch-array() Error

Recommended Posts

databasing is quiet hard to learn but im starting to get the hang of it. on my home page i have a few errors like this Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrogers/public_html/html/nav.php on line 80 i have checked whats on line 80 and this is what i ended up with$row = mysql_fetch_array($sql);but it does not look like anything is wrong and i kind of do not under stand the mysql witch i am learning at the moment, but any one know what the problem is please tell me. need any more info like the whole .nav file just ask me.

Notice from m^e:
Try and keep your topic title as relevant to the message body as possible - in general try and include some unique keywords that appear in the message body and compose a title, that best summarizes your post. This will help it get better responses as well as show up on search engines real quick. Topic edited.
Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

Unless you post the whole block of code, it won't be possible to figure out the cause of this error alone from that single line. Such an error message could be because of a wide variety of reasons - missed out closing braces, incorrect table names (MySQL tables are extremely case-sensitive)... so post the whole block of code here and we might be able to help you out.Regards,m^e

Share this post


Link to post
Share on other sites

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrogers/public_html/html/nav.php on line 80
i have checked whats on line 80 and this is what i ended up with

$row = mysql_fetch_array($sql);

Just like microscopic^earthling said, this error happens dur to a wide variety of reasons. If you post your nav.php here, it would be helpful.

However, you can check the code before line 80. $sql may not have any value.
and you can always use 'echo' for debug...

Share this post


Link to post
Share on other sites

did you send a query to mysql_fetch_array() ?

description;

mysql_fetch_array(PHP 3, PHP 4 )

mysql_fetch_array --  Fetch a result row as an associative array, a numeric array, or both.
Description
array mysql_fetch_array ( resource result [, int result_type])


Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.


sorry if i got you wrong...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.