Skip to content

Instantly share code, notes, and snippets.

@jgv
Created March 1, 2011 20:36
Show Gist options
  • Select an option

  • Save jgv/849843 to your computer and use it in GitHub Desktop.

Select an option

Save jgv/849843 to your computer and use it in GitHub Desktop.
$table = '_emails';
$id = 'id_emails';
$emailColumn = 'email_addr;'
$query = sprintf("INSERT INTO `%s`.`%s` (`%s`,`%s`) VALUES (NULL, '%s')",
$dbname,
$table,
$id,
$emailColumn,
mysql_real_escape_string($email));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment