Create getCompareQuery.php

used for CompareQuery. not fully functional.