Jump to content

Archived

This topic is now archived and is closed to further replies.

shunut

mysql_fetch_array Error

Recommended Posts

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)

[code]
return mysql_fetch_array($db.query, MYSQL_ASSOC);
[/code]


Line 17 - object_info.php (second error)

[code]
reset ($object_array);
[/code]


Line 18 - object_info.php (third error)

[code]
while (list($key, $value) = each($object_array))  {
[/code]

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

Share this post


Link to post
Share on other sites
Well, I'm guessing it all stems from the first issue, which is that you're not passing a valid result set.

Share this post


Link to post
Share on other sites
Thats what I figured.  Now more importantly what do I need to do to fix it?

Share this post


Link to post
Share on other sites
What do you think is supposed to be in $db.query?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Well, apparently, the script doesn't either... somewhere there's a MySQL query, and it supposed to be in this variable.

Share this post


Link to post
Share on other sites

×

Important Information

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.