Created
December 19, 2016 01:06
-
-
Save theory/0932ef35463ffb1e78c678daba005a7a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table mass_email_recipients ( | |
id integer, | |
mass_email_send_id integer, | |
status integer | |
); | |
insert into mass_email_recipients | |
values (240, 154, 1), | |
(241, 154, 1), | |
(241, 154, 0); | |
begin; | |
select id from mass_email_recipients | |
where mass_email_send_id = 154 and status = 1; | |
update mass_email_recipients set status = 2 where id in ( | |
select id from mass_email_recipients | |
where mass_email_send_id = 154 and status = 1 | |
); | |
rollback; | |
BEGIN; | |
update mass_email_recipients set status = 2 | |
where mass_email_send_id = 154 and status = 1; | |
ROLLBACK; | |
drop table mass_email_recipients; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment