Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Help Needed With MySQL_fetch-array() Error
Cookiemonster
post Jun 11 2005, 03:07 PM
Post #1


Member [ Level 1 ]
Group Icon

Group: Members
Posts: 36
Joined: 10-June 05
From: London
Member No.: 6,063



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.



This post has been edited by microscopic^earthling: Jun 11 2005, 04:39 PM
Go to the top of the page
 
+Quote Post
miCRoSCoPiC^eaRt...
post Jun 11 2005, 04:00 PM
Post #2


PsYcheDeLiC dR3aMeR
Group Icon

Group: Admin
Posts: 2,242
Joined: 29-January 05
From: Nakorn Chaisri, Thailand
Member No.: 2,411
myCENTs:84.36



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
Go to the top of the page
 
+Quote Post
jedipi
post Jun 11 2005, 11:47 PM
Post #3


Premium Member
Group Icon

Group: Members
Posts: 352
Joined: 2-March 05
From: Australia
Member No.: 2,859



QUOTE(Cookiemonster @ Jun 12 2005, 02:07 AM)


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...
Go to the top of the page
 
+Quote Post
wanhafizi
post Jun 13 2005, 12:04 AM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 145
Joined: 13-December 04
Member No.: 1,734



did you send a query to mysql_fetch_array() ?

description;
QUOTE
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...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. MySQL - Trouble With Bulk Insert Statements(3)
  2. MySQL Realtime Replication(4)
  3. Recover Tables From A MySQL .frm File(8)
  4. Mirror My MySQL Database To Another Mysql Server(4)
  5. How To Connect MySQL With Flash?(8)
  6. MySQL Output Database Question(18)
  7. MySQL, Multiple Tables(24)
  8. Navcat For MySQL(9)
  9. Permission Problem With Mysql Database Creation(8)
  10. Mysql And Php(15)
  11. Login System Using A Mysql Db(5)
  12. Oracle Vs. Mysql Vs. Postgresql(9)
  13. Subqueries In Mysql(1)
  14. Apache Php With Mysql On Windows [solved](9)
  15. Mysql - So Hard(14)
  1. Mysql Problem(1)
  2. Sun Bought Mysql(6)
  3. Mysql Backup With Another Address?(4)
  4. I Have An Error With My Mysql Connection(7)
  5. Mysql And User File_priv(0)
  6. Mysql Database Management(1)
  7. Mysql Database Entry By Excel Sheets(2)
  8. Mysql On Computer(9)
  9. Space Needed For Database(10)
  10. Any Website Provide Free Host Mysql Host?(4)
  11. Mysql Multiple Tables(1)
  12. Mysql Overhead(3)
  13. Login System(6)


 



- Lo-Fi Version Time is now: 23rd November 2008 - 05:18 PM