Даже после того, как прочитал все вопросы, связанные с PDO Insert not working, на S.O, я до сих пор не могу понять, что не работает в PDO SQL Query. Хотелось бы помочь в этом.PDO insert not working bindParam bindValue
$sql = "INSERT INTO `order_item` (`fk_order`,`fk_product`,`product_excl_tax`,`tax_product`,`shipping_excl_tax`,`tax_shipping`,`order_item_status`,`updated_at`)
VALUES (:theorderid, :product_id, :product_price, :price_incl_tax, :product_shipping, :product_shippingttc, :order_item_status, :dater) " ;
$req = $co_db->prepare($sql);
$req -> bindParam(':theorderid', $theorderid, PDO::PARAM_INT);
$req -> bindParam(':product_id', $product_id, PDO::PARAM_INT);
$req -> bindParam(':product_price', $product_price, PDO::PARAM_STR);
$req -> bindParam(':price_incl_tax', $price_incl_tax, PDO::PARAM_STR);
$req -> bindParam(':product_shipping', $product_shipping, PDO::PARAM_STR);
$req -> bindParam(':product_shippingttc', $product_shippingttc, PDO::PARAM_STR);
$req -> bindParam(':order_item_status', $thestatus , PDO::PARAM_INT);
$req -> bindParam(':dater', $thedate, PDO::PARAM_STR);
$req->execute();
http://php.net/manual/en/function.error-reporting.php и http://php.net/manual/en/pdo.error-handling.php –
У вас есть ошибки? – Mihai
none ... Я пробовал все, но не смог найти – justberare