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

@ -34,31 +34,6 @@ abstract class DbStatement
$this->sql = $sql;
}
/**
* @param mixed $style
* @return array
*/
public function fetchAll($style = Db::FETCH_OBJ)
{
$data = array();
while ($row = $this->fetch($style)) {
$data[] = $row;
}
return $data;
}
/**
* @param string $field
*/
public function fetchField($field)
{
$row = $this->fetch(Db::FETCH_ASSOC);
if (isset($row[$field])) {
return $row[$field];
}
return false;
}
public function bindParam($param, &$value)
{
if ($this->map === null) {
@ -138,6 +113,31 @@ abstract class DbStatement
{
$this->close();
}
/**
* @param mixed $style
* @return array
*/
public function fetchAll($style = Db::FETCH_OBJ)
{
$data = array();
while ($row = $this->fetch($style)) {
$data[] = $row;
}
return $data;
}
/**
* @param string $field
*/
public function fetchField($field)
{
$row = $this->fetch(Db::FETCH_ASSOC);
if (isset($row[$field])) {
return $row[$field];
}
return false;
}
/* Abstract methods */