I went back to the old code to see if I could update it. There's very little to update to msqli. I got it partly done but just don't know enough to finish it. This is the best way to take care of this mod for the moment. Anyone able to help out a bit?
I replaced $row = mysql_fetch_array($result); with $row = $result -> fetch_assoc(); in two places in ordersExport.php and changed the mysql to mysqli in the extra functions file but more is needed in that file.
This what I have
PHP Code:
function mat_query($query) {
// global $mat_debug_logging, $mat_debug_logging_all, $mat_stack_sql_error;
global $mat_sql_errors_msgs, $mat_stack_sql_error;
$result = mysqli_query($query);
if (mysqli_errno()) {
$mat_stack_sql_error = true;
$mat_sql_errors_msgs .= "<br />".mysqli_errno() . ": " . mysqli_error() . "\n";
}
return $result;
}
errors returned are
PHP Code:
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_query() expects at least 2 parameters, 1 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 29
[14-Jul-2015 07:42:37 America/New_York] PHP Warning: mysqli_errno() expects exactly 1 parameter, 0 given in /home/domain/public_html/admin/includes/functions/extra_functions/ordersExport_functions.php on line 30
[14-Jul-2015 07:42:37 America/New_York] PHP Fatal error: Call to a member function fetch_assoc() on a non-object in /home/domain/public_html/admin/ordersExport.php on line 264
So is the problem in the main file or the functions file?