switched select queries to PDO instead of mysql_*