#1589 - Database Classes contains debug flags (merged from branches/2.2.0, r44883)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44916 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-11-15 22:40:48 +00:00
parent 85d6566e32
commit 329567c3fb
2 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ class MySQLDatabase extends Database {
public function query($sql, $errorLevel = E_USER_ERROR) {
if(isset($_REQUEST['previewwrite']) && in_array(strtolower(substr($sql,0,strpos($sql,' '))), array('insert','update','delete','replace'))) {
echo "<p>Will execute: $sql</p>";
Debug::message("Will execute: $sql";
return;
}
@ -447,4 +447,4 @@ class MySQLQuery extends Query {
}
?>
?>

View File

@ -158,7 +158,7 @@ class PDODatabase extends Database {
*/
public function query($sql, $errorLevel = E_USER_ERROR) {
if(isset($_REQUEST['previewwrite']) && in_array(strtolower(substr($sql,0,6)), array('insert','update'))) {
echo "<p>Will execute: $sql</p>";
Debug::message("Will execute: $sql");
return;
}
//Debug::backtrace();
@ -713,4 +713,4 @@ class PDOQuery extends Query {
}
?>
?>