Skip to content

Instantly share code, notes, and snippets.

@damiann
Last active December 21, 2015 02:48
Show Gist options
  • Save damiann/6237099 to your computer and use it in GitHub Desktop.
Save damiann/6237099 to your computer and use it in GitHub Desktop.
<?
$write = Mage::getSingleton("core/resource")->getConnection("core_write");
$query = "insert into mage_example (name, email, company, description, status, date) values (:name, :email, :company, :desc, 0, NOW())";
$binds = array(
'name' => "name' or 1=1",
'email' => "email",
'company' => "company",
'desc' => "desc",
);
$write->query($query, $binds);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment