well, it is adding both of the conditions to the where clause, your initial where clause is not being ignored, it is being added in.
this section:
WHERE pagecategory <> ?
is initial where clause, and this one:
AND NOT (pagecategory LIKE '%do_not_show_on_menu%')
is the new criteria that you added. Is "do_not_show_on_menu" the actual value that is stored in that column?