fetch_array() : numeric and assoc indices
Changes fetch_assoc mode to fetch_array mode.
The current DB layer for mysql and mysqli uses the mysqli_fetch_assoc and
mysql_fetch_assoc modes. Certain SQL functions (ie: select sum(int)
from...) have to be returned with numeric indices. This allows you to use
the database to perform many functions w/o having to iterate through
resultsets in the script. This mod should affect any current plugins or
core code.
Find in MYBB_ROOT/inc/db_mysql.php
PHP Code:
function fetch_array($query)
{
$array = mysql_fetch_assoc($query);
return $array;
}
Replace with:
PHP Code:
function fetch_array($query)
{
$array = mysql_fetch_array($query);
return $array;
}
Find in MYBB_ROOT/inc/db_mysqli.php
PHP Code:
function fetch_array($query)
{
$array = mysqli_fetch_array($query);
return $array;
}
Replace with:
PHP Code:
function fetch_array($query)
{
$array = mysqli_fetch_array($query);
return $array;
}