From 8fb01f704cf9a04768bfc22784b926fe9c47239d Mon Sep 17 00:00:00 2001 From: zYne Date: Wed, 14 Feb 2007 22:38:39 +0000 Subject: [PATCH] added some sql statements for later usage --- sql.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sql.php diff --git a/sql.php b/sql.php new file mode 100644 index 000000000..7615c7c67 --- /dev/null +++ b/sql.php @@ -0,0 +1,17 @@ +// Sqlite cascading deletes + +CREATE TRIGGER %s DELETE ON %s + BEGIN + DELETE FROM %s WHERE %s = %s; + END; + +// Sqlite AuditLog + +CREATE TRIGGER %s UPDATE OF %s ON %s + BEGIN + INSERT INTO %s (%s) VALUES (%s) WHERE %s = %s; + END; +CREATE TRIGGER %s DELETE ON %s + BEGIN + INSERT INTO %s (%s) VALUES (%s) WHERE %s = %s; + END;