PDO Fixes

mysql_real_escape_string requires a mysql_connect connection, therefore
it will not work with the PDO update. There was also a typo, rowCount
was called as an object not a function