Skip to content

Instantly share code, notes, and snippets.

@xqus
Created December 20, 2011 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xqus/1503797 to your computer and use it in GitHub Desktop.
Save xqus/1503797 to your computer and use it in GitHub Desktop.
PDO field escaping
<?php
$sth = $dbh->prepare(
'DESCRIBE `'.str_replace(array('\\',"\0" ,'`'), '', $table).'`'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment