compareQuery->compareSelectQuery
mysql_query -> PDO + Criterion