fix: Определения типов
This commit is contained in:
parent
9f6fd74b17
commit
dd74a97894
28 changed files with 334 additions and 249 deletions
|
|
@ -16,7 +16,11 @@ class Statement
|
|||
protected $conn;
|
||||
protected $query;
|
||||
|
||||
function __construct($query, $conn/*: Database*/) {
|
||||
/**
|
||||
* @param string $query
|
||||
* @param Database $conn
|
||||
*/
|
||||
function __construct($query, $conn) {
|
||||
$this->query = $query;
|
||||
$this->conn = $conn;
|
||||
}
|
||||
|
|
@ -45,7 +49,7 @@ class Statement
|
|||
if ($this->limit) {
|
||||
$this->query .= " LIMIT {$this->limit} OFFSET {$this->offset}";
|
||||
}
|
||||
$stmt/*: PDOStatement*/ = $this->conn->prepare($this->query);
|
||||
$stmt = $this->conn->prepare($this->query);
|
||||
foreach ($this->binds as $bind) {
|
||||
list($n, $value, $type) = $bind;
|
||||
$stmt->bindValue($n, $value, (int) $type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue