Each mysql_ function has its own pdo_mysql_ equivalent (or will do) and will work out of the box like this. This is designed so that you can do a find and replace adding pdo_ infront of the mysql ...