From 20bcf3c1f510dfb53420c74b76992fd7258197a6 Mon Sep 17 00:00:00 2001 From: Evgeny Gryaznov Date: Sun, 27 Feb 2011 00:02:29 +0100 Subject: [PATCH] code cleanup --- src/messenger/webim/install/dbperform.php | 2 +- src/messenger/webim/libs/common.php | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/messenger/webim/install/dbperform.php b/src/messenger/webim/install/dbperform.php index 0186f40c..7c13be46 100644 --- a/src/messenger/webim/install/dbperform.php +++ b/src/messenger/webim/install/dbperform.php @@ -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; } diff --git a/src/messenger/webim/libs/common.php b/src/messenger/webim/libs/common.php index a2dde416..75a52e69 100644 --- a/src/messenger/webim/libs/common.php +++ b/src/messenger/webim/libs/common.php @@ -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)) {