FetchColumn method, #16
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@132 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -130,6 +130,18 @@ abstract class DbStatement
|
||||
/**
|
||||
* @param string $field
|
||||
*/
|
||||
public function fetchColumn($field)
|
||||
{
|
||||
$data = array();
|
||||
while ($row = $this->fetch(Db::FETCH_ASSOC)) {
|
||||
$data[] = $row[$field];
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $field
|
||||
*/
|
||||
public function fetchField($field)
|
||||
{
|
||||
$row = $this->fetch(Db::FETCH_ASSOC);
|
||||
|
Reference in New Issue
Block a user