Memcache, refactoring, View helpers, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@124 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
pzinovkin
2010-03-13 23:33:46 +00:00
parent 4a22759e3d
commit 8fc917dca2
19 changed files with 706 additions and 147 deletions

View File

@ -16,9 +16,15 @@
class MySQLiStatement extends DbStatement
{
/**
* Fetches single row
*
* @param mixed $style
* @return mixed
*/
public function fetch($style = Db::FETCH_OBJ)
{
if (! $this->result) {
if (!$this->result) {
return false;
}
@ -77,7 +83,13 @@ class MySQLiStatement extends DbStatement
* @var MySQLi
*/
$mysqli = $this->driver->getConnection();
$result = $mysqli->query($sql);
if (DEBUG) {
$profiler = Profiler::getInstance()->profilerQuery($sql);
$result = $mysqli->query($sql);
$profiler->end();
} else {
$result = $mysqli->query($sql);
}
if ($result === false) {
throw new Exception($mysqli->error, $mysqli->errno);
}