Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

mysql vs mysqli - Urgent help needed please


Mort-lemur

Recommended Posts

Posted

Just finishing my 2.3.3.4 install and everything is now working on the live server, apart from the callback on one of my payment systems (epdq)

 

this line is causing an error:

$row = mysql_fetch_row($rs);

 

when i hange it to

$row = tep_db_fetch_row($rs);

it causes a fatal error.

 

this line also causes an error:

		   $order_status = mysql_fetch_assoc($rs);

 

What is the correct code I should be using here?

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

Ok had a brainwave,

 

Do I need to add something like

function tep_db_fetch_row($db_query) {
   return mysqli_fetch_row($db_query);
 }

 

and

function tep_db_fetch_assoc($db_query) {
   return mysqli_fetch_assoc($db_query);
 }

 

includes/functions/database.php?

 

Ill give it a try...............

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

Change the original code from "mysql" to "mysqli"

 

mysql_fetch_row => mysqli_fetch_row

mysql_fetch_assoc => mysqli_fetch_assoc

 

Should do it.

 

In the next update of osCommerce, there will be some extra functions dealing with mysqli.

Posted

Well - That actually seemed to work!! :D

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

sorry Gary - I meant my code not yours - both posting at the same time.....

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Posted

There's no need for new functions here. mysqli_fetch_row() and mysqli_fetch_assoc() can both be replaced by mysqli_fetch_array(), so you can use tep_db_fetch_array() in place of both.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

@@kymation Thanks Jim - Thought I was being clever adding new functions - Ill swap over to your method :)

 

Many Thanks

Now running on a fully modded, Mobile Friendly 2.3.4 Store with the Excellent MTS installed - See my profile for the mods installed ..... So much thanks for all the help given along the way by forum members.

Archived

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

×
×
  • Create New...