ensure_db_ok (): on error: do not refresh immediately, but wait for one second. put helpers in common.php
This commit is contained in:
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
function ensure_db_ok ($sql_stmt) {
|
||||||
|
if($sql_stmt == False) {
|
||||||
|
echo "Database is busy";
|
||||||
|
header("refresh:1;");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user