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:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user