Contributions
Output Queries Debug
This contribution catures each query used to construct a page and can be output if desired.
Expand All / Collapse All
Quick fix, I found that the database.php modifications caused errors on some contribs like a fedex tracking contrib that uses ?track= in the url.
Added a quick fix to database.php that disables these queries when the query or time output is not enabled in admin.
install as per usual - but at the bottom of general.php - try this code...
some of the querys are super long and they were breaking my page and meant a lot of sideways scrolling - this should sort that out for you..
what a great contrib though - highly recommend for any serious oscommerce store!!
just put this at the bottom of general.php instead:
function print_array ($array, $exit = false) {
print "<pre style='line-height: 2em; font-family: arial; width: 1024; white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */'>";
print_r ($array);
print "</pre>";
if ($exit) exit();
}
Added configuration to Admin Panel and new outputting function.
Ooops...typo correction for previous file.
This version has COOKIE, SESSION, POST, and GET data added to the output. If you don't want all these options download a previous version.
This version adds the COOKIE and SESSION to the output array. If you don't want this output install the previous version.
This version adds the execution time for each query to the debug array. This info is only output when debug mode is activated.
Corrected small typo in install file...
This contribution catures each query used to construct a page and can be output if desired.
Note: Contributions are used at own risk.