Ajuste classe Products.class.php
This commit is contained in:
parent
bffaae912d
commit
134595afa9
1 changed files with 7 additions and 7 deletions
14
vendor/model/Products.class.php
vendored
14
vendor/model/Products.class.php
vendored
|
|
@ -85,13 +85,13 @@ class Products
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select * from products
|
||||
where products_id = :products_id';
|
||||
where product_id = :product_id';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam(':products_id', $this->productsId);
|
||||
$this->stmt->bindParam(':product_id', $this->productsId);
|
||||
|
||||
/** Executo o SQL */
|
||||
$this->stmt->execute();
|
||||
|
|
@ -151,7 +151,7 @@ class Products
|
|||
public function Count()
|
||||
{
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'select count(products_id) as qtde
|
||||
$this->sql = 'select count(product_id) as qtde
|
||||
from products';
|
||||
|
||||
/** Preparo o SQL para execução */
|
||||
|
|
@ -188,13 +188,13 @@ class Products
|
|||
reference = :reference,
|
||||
version = :version,
|
||||
version_release = :version_release
|
||||
where products_id = :products_id';
|
||||
where product_id = :product_id';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('products_id', $this->productsId);
|
||||
$this->stmt->bindParam('product_id', $this->productsId);
|
||||
$this->stmt->bindParam('products_type_id', $this->productsTypeId);
|
||||
$this->stmt->bindParam('description', $this->description);
|
||||
$this->stmt->bindParam('reference', $this->reference);
|
||||
|
|
@ -243,13 +243,13 @@ class Products
|
|||
|
||||
/** Consulta SQL */
|
||||
$this->sql = 'delete from products
|
||||
where products_id = :products_id';
|
||||
where product_id = :product_id';
|
||||
|
||||
/** Preparo o sql para receber os valores */
|
||||
$this->stmt = $this->connection->connect()->prepare($this->sql);
|
||||
|
||||
/** Preencho os parâmetros do SQL */
|
||||
$this->stmt->bindParam('products_id', $this->productsId);
|
||||
$this->stmt->bindParam('product_id', $this->productsId);
|
||||
|
||||
/** Executo o SQL */
|
||||
return $this->stmt->execute();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue