1 2 3 4 5 6 7 8 9 10
| public function ajouter(connectiondb $produit){
$q = $this->db->prepare('INSERT INTO [Table] SET :product_name=:product_name,product_description=:product_description,product_quantity=:product_quantity');
'<input type="text" name="product_name" value="nom"';
'<input type="text" name="product_description" value="nom"';
'<input type="text" name="product_quantity" value="nom"';
$q->bindValue(':product_name', $produit->product_name());
$q->bindValue(':product_description', $produit->product_description() );
$q->bindValue(':product_quantity', $produit->product_quantity());
$q->execute();
} |
Partager