I am converting some of my code that used ext/mysql (
mysql_*() functions) to PDO and prepared statements. Previously when I was dynamically constructing queries I simply passed my strings through
mysql_real_escape_string() and dropped them straight into my query, but now I find I need to pass the values in as an array when I execute the query, or bind the variables before execution.
How can I convert my old code to use the new database driver?