break;
}
- if (pg_query($bdb->dbconn->db(), "BEGIN") == FALSE) {
- log_crit("stat-day: begin failed");
- break;
- }
+ //if ($bdb->transaction("BEGIN") == FALSE) {
+ // log_crit("stat-day: begin failed");
+ // break;
+ //}
// retrieve list of active tournaments
$trn_sql = sprintf("SELECT * FROM %sbin5_tournaments WHERE active = 1;", $G_dbpfx);
log_crit(sprintf("stat-day: t < trn_n (%d, %d)", $t, $trn_n));
break;
}
+ // if ($bdb->transaction("COMMIT") == FALSE) {
+ // break;
+ // }
$ret = (TRUE);
} while (0);
- if ($ret == FALSE) {
- pg_query($bdb->dbconn->db(), "ROLLBACK");
- }
+ // if ($ret == FALSE) {
+ // $bdb->transaction("ROLLBACK");
+ // }
if ($fpexp != FALSE) {
fclose($fpexp);
}
$maxg = array( TRI_MAX_GAMES, MON_MAX_GAMES, WEE_MAX_GAMES );
do {
- if (pg_query($bdb->dbconn->db(), "BEGIN") == FALSE) {
+ if ($bdb->transaction("BEGIN") == FALSE) {
log_crit("statadm: begin failed");
break;
}
break;
}
- if (pg_query($bdb->dbconn->db(), "COMMIT") == FALSE) {
+ if ($bdb->transaction("COMMIT") == FALSE) {
break;
}
return (TRUE);
} while (0);
- pg_query($bdb->dbconn->db(), "ROLLBACK");
+ $bdb->transaction("ROLLBACK");
return (FALSE);
}