Update database.php
This commit is contained in:
parent
cee6509dfa
commit
dcebd777af
|
@ -148,9 +148,6 @@ if(!check_function_exists("exec_db_query")) {
|
||||||
$dbc = get_dbc_object();
|
$dbc = get_dbc_object();
|
||||||
$terms = explode(" ", trim($sql));
|
$terms = explode(" ", trim($sql));
|
||||||
|
|
||||||
// before transaction
|
|
||||||
$dbc->beginTransaction();
|
|
||||||
|
|
||||||
// check sql insert or not
|
// check sql insert or not
|
||||||
if($terms[0] == "insert") {
|
if($terms[0] == "insert") {
|
||||||
$stmt = get_db_stmt($sql, $bind, array(
|
$stmt = get_db_stmt($sql, $bind, array(
|
||||||
|
@ -164,9 +161,6 @@ if(!check_function_exists("exec_db_query")) {
|
||||||
$flag = $stmt->execute();
|
$flag = $stmt->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
// commit transaction
|
|
||||||
$dbc->commit();
|
|
||||||
|
|
||||||
// get errors
|
// get errors
|
||||||
$errors = $stmt->errorInfo();
|
$errors = $stmt->errorInfo();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user