1 2 3
<?php $query = 'select "CNID" from contractnotice where "CNID" like \'%00_\' and "parentCN" is not null and length("CNID") > 6';