global $db;
if (!$rs = $db->Execute($sql)) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />$sql");
}
return false;
$rs = $db->Execute("$sql");
if (!$rs) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />$sql");
}
return 0;
global $db, $CFG;
- if ($CFG->debug > 7) { // Debugging mode - don't use limit
+ if (isset($CFG->debug) and $CFG->debug > 7) { // Debugging mode - don't use limit
$limit = "";
} else {
$limit = " LIMIT 1"; // Workaround - limit to one record
}
if (!$rs = $db->Execute("$sql$limit")) {
- if ($CFG->debug > 7) { // Debugging mode - print checks
+ if (isset($CFG->debug) and $CFG->debug > 7) { // Debugging mode - print checks
notify( $db->ErrorMsg() . "<br /><br />$sql$limit" );
}
return false;
global $CFG,$db;
if (!$rs = $db->Execute($sql)) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />$sql");
}
return false;
global $db;
if (!$rs = $db->Execute($sql)) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />$sql");
}
return false;
$rs = $db->Execute("SELECT $return FROM $CFG->prefix$table $select");
if (!$rs) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />SELECT $return FROM $CFG->prefix$table $select");
}
return false;
/// Run the SQL statement
if (!$rs = $db->Execute($insertSQL)) {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />$insertSQL");
}
return false;
if ($rs = $db->Execute("UPDATE $CFG->prefix$table SET $update WHERE id = '$dataobject->id'")) {
return true;
} else {
- if ($CFG->debug > 7) {
+ if (isset($CFG->debug) and $CFG->debug > 7) {
notify($db->ErrorMsg()."<br /><br />UPDATE $CFG->prefix$table SET $update WHERE id = '$dataobject->id'");
}
return false;