[svn r14034] Updated api_sql_query() so that it doesn't die stupidly before printing the error message, and so that it doesn't die at all.

skala
Yannick Warnier 17 years ago
parent 809f0fb760
commit d996555fa0
  1. 7
      main/inc/lib/main_api.lib.php

@ -604,7 +604,7 @@ function api_get_course_info($course_code=null)
*/
function api_sql_query($query, $file = '', $line = 0)
{
$result = mysql_query($query);
$result = @mysql_query($query);
if ($line && !$result)
{
@ -621,8 +621,9 @@ function api_sql_query($query, $file = '', $line = 0)
$info .= '<b>LINE :</b><br/> ';
$info .= ($line == 0 ? ' unknown ' : $line);
$info .= '</pre>';
@ mysql_close();
die($info);
//@ mysql_close();
//die($info);
echo $info;
}
return $result;
}

Loading…
Cancel
Save