code cleanup

This commit is contained in:
Evgeny Gryaznov 2011-02-27 00:02:29 +01:00
parent b9cc8ed5b1
commit 20bcf3c1f5
2 changed files with 4 additions and 7 deletions

View File

@ -25,7 +25,7 @@ require_once('dbinfo.php');
function runsql($query, $link)
{
$res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error($link));
$res = mysql_query($query, $link) or show_install_err(' Query failed: ' . mysql_error());
return $res;
}

View File

@ -359,14 +359,12 @@ function connect()
function perform_query($query, $link)
{
mysql_query($query, $link)
or die(' Query failed: ' . mysql_error($link) /*.": ".$query*/);
mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
}
function select_one_row($query, $link)
{
$result = mysql_query($query, $link) or die(' Query failed: ' .
mysql_error($link) /*.": ".$query*/);
$result = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
$line = mysql_fetch_array($result, MYSQL_ASSOC);
mysql_free_result($result);
return $line;
@ -374,8 +372,7 @@ function select_one_row($query, $link)
function select_multi_assoc($query, $link)
{
$sqlresult = mysql_query($query, $link) or die(' Query failed: ' .
mysql_error($link) /*.": ".$query*/);
$sqlresult = mysql_query($query, $link) or die(' Query failed: ' . mysql_error($link));
$result = array();
while ($row = mysql_fetch_array($sqlresult, MYSQL_ASSOC)) {