Jump to content

znaji

Members
  • Posts

    10
  • Joined

  • Last visited

znaji's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi Would like to rewrite this patch of MySQL update query better can someone please help. $sqlStatment = "UPDATE products SET " . "catid=" . $_REQUEST['cat'] . ", cattxt='" . $catText . "', ptitle='" . $_REQUEST['ptitle'] . "', saleoffer='" . $_REQUEST['saleoffer'] . "', url='" . $_REQUEST['url'] . "', tag=" . $_REQUEST['tag'] . "', oldprice=" . $_REQUEST['oprice'] . ", nprice=" . $_REQUEST['nprice'] . ", availability=" . $_REQUEST['availability'] . ", shortdesc = :shortdescription" . ", pdescription = :description" . ", meta_title =" . $_REQUEST['meta_title'] . ", meta_keyword =" . $_REQUEST['meta_keyword'] . "', meta_description=" . $_REQUEST['meta_description'] . ", last_modified = NOW()" . " WHERE id=" . $_REQUEST['pid']; try{ $query = $db->prepare($sqlStatment); $query->execute(array(':shortdescription'=>$_REQUEST['shortdescription'], ':description'=>$_REQUEST['description'])); } catch(PDOException $e) { die($e->getMessage()); } Thank you for any help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.