} // END - if
// Count DB hits
- if (getConfig('db_hits_run') == null) {
+ if (!isConfigEntrySet('db_hits_run')) {
// Count in dummy variable
setConfigEntry('db_hits_run', 1);
} else {
}
// SQL num rows
-function SQL_NUMROWS($result) {
+function SQL_NUMROWS ($result) {
// Is the result a valid resource?
if (is_resource($result)) {
// Get the count of rows from database
// Was the eval() command fine?
if ($query == "failed") {
// Something went wrong?
- print "eval=".htmlentities($eval)."<pre>";
- debug_print_backtrace();
- die("</pre>");
+ printf("eval=%s\n<pre>%s</pre>",
+ htmlentities($eval),
+ debug_get_printable_backtrace()
+ );
+
+ // Abort further code executions
+ exit;
} // END - if
if ($run) {