еще 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 = $this->prepare($query);
|
||||||
$sth->setFetchMode(PDO::FETCH_ASSOC);
|
$prep = $this->prepareValues($values);
|
||||||
$sth->execute();
|
$sth->execute($prep);
|
||||||
return $sth->fetchAll();
|
return $sth->fetchAll(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Извлекает из базы первый элемент по запросу
|
* Извлекает из базы первый элемент по запросу
|
||||||
*/
|
*/
|
||||||
public function fetchOneArray($query)
|
public function fetchOneArray($query,$values=null)
|
||||||
{
|
{
|
||||||
$sth = $this->prepare($query);
|
$sth = $this->prepare($query);
|
||||||
$sth->setFetchMode(PDO::FETCH_ASSOC);
|
$prep = $this->prepareValues($values);
|
||||||
$sth->execute();
|
$sth->execute($prep);
|
||||||
return $sth->fetch();
|
return $sth->fetch(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function assignQuote($x, $y)
|
private function assignQuote($x, $y)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue