Site in read-only mode
This site is now read-only following the release of MyBB 1.8 and the new mods site.
If you are looking for MyBB 1.8 mods please click here to visit the new mods site.
You can continue to download submissions for MyBB 1.6 and earlier here, however new submissions will only be accepted via the new mods site.
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
function fetch_array($query)
{
$array = mysql_fetch_assoc($query);
return $array;
}
Replace with:
function fetch_array($query)
{
$array = mysql_fetch_array($query);
return $array;
}
Find in MYBB_ROOT/inc/db_mysqli.php
function fetch_array($query)
{
$array = mysqli_fetch_array($query);
return $array;
}
Replace with:
function fetch_array($query)
{
$array = mysqli_fetch_array($query);
return $array;
}