// Perfs improved

This commit is contained in:
dMetzger
2012-07-31 16:32:44 +00:00
parent 51cf47b92d
commit 3b60d6875e
2 changed files with 42 additions and 20 deletions
+6 -1
View File
@@ -59,7 +59,12 @@ function ddd($var)
*/
function pSQL($string, $htmlOK = false)
{
return Db::getInstance()->escape($string, $htmlOK);
// Avoid thousands of "Db::getInstance()"...
static $db = false;
if (!$db)
$db = Db::getInstance();
return $db->escape($string, $htmlOK);
}
function bqSQL($string)