CHANGE MYSQL PHP FUNCTION TO PDO