Skip to content

Instantly share code, notes, and snippets.

@rantastic
Created March 21, 2013 20:34
Show Gist options
  • Save rantastic/5216489 to your computer and use it in GitHub Desktop.
Save rantastic/5216489 to your computer and use it in GitHub Desktop.
PHP: PDO insert single
$stmt = $db->prepare("INSERT INTO tablename (var1, var2, var3) VALUES (?,?,?)");
$stmt->execute(array($var1,$var2,$var3));
if($stmt->rowCount()>0){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment