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:
Ingo Schommer 2010-04-13 01:43:44 +00:00
parent ee4174c0e2
commit 6fb2a2a2e0

View File

@ -122,15 +122,6 @@ class DB {
*/
static function query($sql, $errorLevel = E_USER_ERROR) {
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);
}