Jump to content
Sign in to follow this  
stanj

Attribute Set: SQL function problem for Catalog

Recommended Posts

Hello

I am a fairly new user so this might be obvious to someone else but not to me. I followed the instructions for the installation of Attribute Sets and the process of adding and assigning attributes to a product works great. A real time saver. Thank you.

 

In the process of that straight forward installation, a not so straight-forward problem emerged in the catalog section. All seems to ok until a product info page is displayed and in which case the attribute pulldown boxes show up but no product desciption, price or image, and the error:

 

"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\.........\catalog\includes\functions\database.php on line 99"

 

The function pointed to in database.php is:

 

line 98 function tep_db_fetch_array($db_query) {

line 99 return mysql_fetch_array($db_query, MYSQL_ASSOC);

}

 

This datbase.php file is unmodified and compares identically. The admin/includes/functions/database.php was checked and the same line is identical. The changes to that file are in the appending of two functions at the end. Apparently this function returns the associated index of the array but I am not sure.

 

Ok, master Gurus, any ideas?

Stan

Share this post


Link to post
Share on other sites
Hello

I am a fairly new user so this might be obvious to someone else but not to me.  I followed the instructions for the installation of Attribute Sets and the process of adding and assigning attributes to a product works great.  A real time saver.  Thank you.

 

In the process of that straight forward installation, a not so straight-forward problem emerged in the catalog section.  All seems to ok until a product info page is displayed and in which case the attribute pulldown boxes show up but no product desciption, price or image, and the error:

 

"Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\.........\catalog\includes\functions\database.php on line 99"

 

  The function pointed to in database.php is:

 

line 98  function tep_db_fetch_array($db_query) {

line 99  return mysql_fetch_array($db_query, MYSQL_ASSOC);

              }

 

This datbase.php file is unmodified and compares identically.  The admin/includes/functions/database.php was checked and the same line is identical.  The changes to that file are in the appending of two functions at the end. Apparently this function returns the associated index of the array but I am not sure.

 

Ok, master Gurus, any ideas? 

Stan

 

Hey there,

I had a similar problem and I finally figured out it was because I had updated from a previous version and didn't remove some code from that version to add the new one (ok, I know, sounds confusing).

 

My 2 cents are - check the code on that page and make sure it doesn't state the same thing twice, also check for extra { and [ - those are usually culprits.

 

And by the way, check that on the product_info page too. The database.php is hardly ever the problem.

 

Hope it helps - I am not an expert on this (yet!) *L*

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
Sign in to follow this  

×