Finished switching db_functions over to PDO