mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Removed debug code (from r97910)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102552 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ee4174c0e2
commit
6fb2a2a2e0
@ -122,15 +122,6 @@ class DB {
|
|||||||
*/
|
*/
|
||||||
static function query($sql, $errorLevel = E_USER_ERROR) {
|
static function query($sql, $errorLevel = E_USER_ERROR) {
|
||||||
self::$lastQuery = $sql;
|
self::$lastQuery = $sql;
|
||||||
/* debug helper for query efficiency
|
|
||||||
if(substr(strtolower($sql),0,6) == 'select') {
|
|
||||||
$product = 1;
|
|
||||||
foreach(self::getConn()->query("explain " . $sql, $errorLevel) as $explainRow) {
|
|
||||||
if($explainRow['rows']) $product *= $explainRow['rows'];
|
|
||||||
}
|
|
||||||
if($product > 100)
|
|
||||||
Debug::message("Cartesian product $product for SQL: $sql");
|
|
||||||
} */
|
|
||||||
|
|
||||||
return self::getConn()->query($sql, $errorLevel);
|
return self::getConn()->query($sql, $errorLevel);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user