jaynesh — 2012-01-31T17:19:57-05:00 — #1
I have two tables.
Pending (id, uid, data)
Approved (id, uid, data)
When data is submitted it is inserted into the pending table. Once approved I want the data to be transferred into the approved table.
pravingate07 — 2012-02-01T02:48:16-05:00 — #2
you can write a trigger
CREATE TRIGGER myTrigger
AFTER INSERT ON PENDING
FOR EACH ROW
CHK HERE APPROVED CONDIN
INSERT INTO Approved (id, uid, data) values(id, uid, data)
r937 — 2012-02-01T06:19:14-05:00 — #3
you should really have only one table, with a status column
then instead of "transferring" rows from one table to another, you simply update the status