Jump to content


Photo

mysql_fetch_array Error


  • Please log in to reply
5 replies to this topic

#1 shunut

shunut
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2006 - 06:34 PM

I wasn't sure if this was the right place for this or if this should be in php help but I'll start here.  I have an online paintball store.  The site was a presetup site from osCommerce I just had to change paths and add my stuff.  I know html but know nothing about php coding or mysql.  I came across this error the other day and posted it on a osCommerce site but I have received no help.  If anybody could help me or point me in the right direction I would appreciate it.  I'm up for learning what I need to do to fix this problem but don't know where to look.

Here is the error I get:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/d/u/r/durrell12/html/catalog/admin/includes/functions/database.php on line 100

Warning: reset(): Passed variable is not an array or object in /home/content/d/u/r/durrell12/html/catalog/admin/includes/classes/object_info.php on line 17

Warning: Variable passed to each() is not an array or object in /home/content/d/u/r/durrell12/html/catalog/admin/includes/classes/object_info.php on line 18

I went into each file and here are the lines it is calling:


Line 100 - database.php (first error)

return mysql_fetch_array($db.query, MYSQL_ASSOC);


Line 17 - object_info.php (second error)

reset ($object_array);


Line 18 - object_info.php (third error)

while (list($key, $value) = each($object_array))   {

If anybody could help me at all I would greatly appreciate it.  If you need more info, please ask.

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 06 October 2006 - 08:51 PM

Well, I'm guessing it all stems from the first issue, which is that you're not passing a valid result set.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 shunut

shunut
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 06 October 2006 - 10:16 PM

Thats what I figured.  Now more importantly what do I need to do to fix it?

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 09 October 2006 - 05:34 AM

What do you think is supposed to be in $db.query?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 shunut

shunut
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 October 2006 - 03:15 PM

I have no idea.  I thought that was just telling it to look at my database.  I don't do php, html is all I've learned so far.

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 10 October 2006 - 03:24 PM

Well, apparently, the script doesn't either... somewhere there's a MySQL query, and it supposed to be in this variable.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users