Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function AddProduct($pname, $packtype, $recomprice, $fmlycode)
- {
- global $db;
- $cmd_add_product = "INSERT INTO products (Pname, PackType, RecomPrice, fmlyCode) VALUES (:pname, :packtype, :recomprice, :fmlycode);";
- try
- {
- $qry = $db-> prepare($cmd_add_product);
- $qry -> bindValue(':pname', $pname);
- $qry -> bindValue(':packtype', $packtype);
- $qry -> bindValue(':recomprice', $recomprice);
- $qry -> bindValue(':fmlycode', $fmlycode);
- $qry -> execute();
- $result = $qry -> fetch();
- return $result;
- }
- catch (PDOException $ex)
- {
- echo "There was a problem add the product".$ex->GetMessage();
- exit;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement