Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Attribute Set: SQL function problem for Catalog


stanj

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

Link to comment
Share on other sites

  • 2 weeks later...
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*

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...