еще update
This commit is contained in:
parent
5089a652eb
commit
0a8c482b41
1 changed files with 8 additions and 8 deletions
|
|
@ -56,23 +56,23 @@ class Database extends PDO
|
|||
/**
|
||||
* Извлекает из базы все элементы по запросу
|
||||
*/
|
||||
public function fetchAllArray($query)
|
||||
public function fetchAllArray($query,$values=null)
|
||||
{
|
||||
$sth = $this->prepare($query);
|
||||
$sth->setFetchMode(PDO::FETCH_ASSOC);
|
||||
$sth->execute();
|
||||
return $sth->fetchAll();
|
||||
$prep = $this->prepareValues($values);
|
||||
$sth->execute($prep);
|
||||
return $sth->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Извлекает из базы первый элемент по запросу
|
||||
*/
|
||||
public function fetchOneArray($query)
|
||||
public function fetchOneArray($query,$values=null)
|
||||
{
|
||||
$sth = $this->prepare($query);
|
||||
$sth->setFetchMode(PDO::FETCH_ASSOC);
|
||||
$sth->execute();
|
||||
return $sth->fetch();
|
||||
$prep = $this->prepareValues($values);
|
||||
$sth->execute($prep);
|
||||
return $sth->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
private function assignQuote($x, $y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue