I am trying to add something to my database and it is not working, I am not sure how to solve it.. I am new to PHP sorry for the obvious mistakes if any.
public function setProductsStmt($sku, $name, $price, $typeId) {
$sql = "INSERT INTO Product_table(SKU, Name, Price, TypeID) VALUES (?, ?, ?, ?)";
$stmt = $this->connect()->prepare($sql);
$stmt->bind_param("ssii",$sku, $name, $price, $typeId);
$stmt->execute();
}
source https://stackoverflow.com/questions/67842734/how-do-i-modify-my-insert-function-in-order-to-make-it-work-in-php
No comments:
Post a Comment