Replaced all mysql_fetch_array by mysql_fetch_assoc or mysql_fetch_row, except for the directory /install

This commit is contained in:
Dmitriy Simushev 2011-11-10 15:25:46 +00:00
parent b22f5456fc
commit 65404ac1d2
2 changed files with 5 additions and 5 deletions

View File

@ -406,7 +406,7 @@ function perform_query($query, $link)
function select_one_row($query, $link)
{
$result = mysql_query($query, $link) or die(' Query failed: ' . db_error($link));
$line = mysql_fetch_array($result, MYSQL_ASSOC);
$line = db_fetch_assoc($result);
mysql_free_result($result);
return $line;
}
@ -416,7 +416,7 @@ function select_multi_assoc($query, $link)
$sqlresult = mysql_query($query, $link) or die(' Query failed: ' . db_error($link));
$result = array();
while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) {
while ($row = db_fetch_assoc($sqlresult)) {
$result[] = $row;
}
mysql_free_result($sqlresult);
@ -434,7 +434,7 @@ function db_rows_count($table, $conditions, $countfields, $link)
{
$result = mysql_query(db_build_select("count(" . ($countfields ? $countfields : "*") . ")", $table, $conditions, ""), $link)
or die(' Count query failed: ' . db_error($link));
$line = mysql_fetch_array($result, MYSQL_NUM);
$line = db_fetch_row($result);
mysql_free_result($result);
return $line[0];
}
@ -700,7 +700,7 @@ function loadsettings_($link)
$sqlresult = mysql_query("select vckey,vcvalue from ${mysqlprefix}chatconfig", $link) or die(' Query failed: ' . db_error($link));
while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) {
while ($row = db_fetch_assoc($sqlresult)) {
$name = $row['vckey'];
$settings[$name] = $row['vcvalue'];
$settings_in_db[$name] = true;

View File

@ -41,7 +41,7 @@ if ($query !== false) {
$result = mysql_query("select ${mysqlprefix}chatgroup.groupid as groupid, vclocalname " .
"from ${mysqlprefix}chatgroup order by vclocalname", $link);
$groupName = array();
while ($group = mysql_fetch_array($result, MYSQL_ASSOC)) {
while ($group = db_fetch_assoc($result)) {
$groupName[$group['groupid']] = $group['vclocalname'];
}
mysql_free_result($result);