- in case of SQL error, stop execution (prevents from errors in

synchronization)


git-svn-id: http://piwigo.org/svn/trunk@735 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2005-02-13 10:21:11 +00:00
parent d6af5d9628
commit 6a16bf5bb1

View File

@@ -609,20 +609,13 @@ function get_thumbnail_src($path, $tn_ext = '')
// my_error returns (or send to standard output) the message concerning the
// error occured for the last mysql query.
function my_error($header, $echo = true)
function my_error($header)
{
$error = '<pre>';
$error.= $header;
$error.= '[mysql error '.mysql_errno().'] ';
$error.= mysql_error();
$error.= '</pre>';
if ($echo)
{
echo $error;
}
else
{
return $error;
}
die ($error);
}
?>