Changed perform_query function. It now returns a reference to the query result

This commit is contained in:
Dmitriy Simushev 2011-11-10 16:05:34 +00:00
parent 65404ac1d2
commit 7f31dfa2af

View File

@ -400,7 +400,11 @@ function db_fetch_assoc($result){
function perform_query($query, $link)
{
mysql_query($query, $link) or die(' Query failed: ' . db_error($link));
$result = mysql_query($query, $link);
if (! $result) {
die(' Query failed: ' . db_error($link));
}
return $result;
}
function select_one_row($query, $link)