######Cheat sheet for using PDO to interact with MySQL db's
Used to use MySQL
then found out it was being depreciated, this is of course right after I got the hang of it and was almost finished with the project i was using to learn myself. So desided to make the switch to PDO
way much easier especially if you have security in mind.
For instance instead of $var = mysql_real_escape_string($_POST['data'];
, you just $var = $db->quote($_POST['data'];
. Or even better use prepared staements and the underlying driver will not only escape but quote the string for you!