Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

EMERGENCY: mysql_fetch_array() expects parameter 1 to be resource


MattCardly

Recommended Posts

Hi, My hosting company have recently upgraded to PHP 5.3.10 from 5.2.15. This seems to have had a major effect on some of the code on my website.

 

Mainly on the product page, I am receiving the below error message -

 

Warning: mysql_fetch_array() expects parameter 1 to be resource, null given in/home/cardlyco/public_html/includes/functions/database.php on line 99.

 

Please can someone help with this issue. I can post any code that is required.

 

 

Please help asap

Many thanks,

Matt

Link to comment
Share on other sites

I take it you are using an older version than 2.3.1?

 

Try changing this in the above mentioned file from

 function tep_db_fetch_array($db_query) {
return mysql_fetch_array($db_query, MYSQL_ASSOC);
 }

 

to

 

 function tep_db_fetch_array($db_query) {
//   return mysql_fetch_array($db_query, MYSQL_ASSOC);
return mysql_fetch_assoc($db_query);
 }

 

Then this

 

return mysql_insert_id($$link);
 }

 

to

 

  // Edit change
return mysql_insert_id();
  //return mysql_insert_id($$link);
 }

Sometimes you're the dog and sometimes the lamp post

[/url]

My Contributions

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...