mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#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:
parent
85d6566e32
commit
329567c3fb
@ -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 {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -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 {
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user