select count(category_id) as num_categories
from ttracker_categories
where package_id = :package_id
update ttracker_tickets
set category_id = :transfer_id
where category_id = :category_id
delete from ttracker_categories
where category_id = :category_id
select count(category_id)
from ttracker_categories
where package_id = :package_id