On 13 Jan 2012, at 12:42am, Tony Caras wrote: > No, the insert I referred to actually is an INSERT OR REPLACE, but it doesn't > work because a REPLACE really is a DELETE the original and INSERT the new. > So in the example if the blocked field was true in the original record and > true in the replacement record, then the counter will get incremented twice > (once for the original insert and again for the insert associated with the > replace).
INSERT OR REPLACE does correctly trigger the DELETE triggers if it deletes a row. If you implement triggers on INSERT, DELETE and UPDATE everything will work correctly. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users