select bug_id
from bt_auto_bugs
where error_file =:error_file
and package_id = :bug_package_id
insert into bt_auto_bugs(bug_id, package_id, error_file)
values (:bug_id, :bug_package_id, :error_file)
update bt_auto_bugs
set times_reported = times_reported + 1
where bug_id = :bug_id
select times_reported
from bt_auto_bugs
where bug_id = :bug_id