topical media & game development
server-php-sqlite-notes.sql / sql
BEGIN TRANSACTION;
CREATE TABLE notes (nkey integer primary key,msg text,category text, timeEnter Date);
INSERT INTO "notes" VALUES(1,'n','take a look at sqlite','2008-10-21 17:03:36');
INSERT INTO "notes" VALUES(2,'n','-l','2008-10-21 17:03:48');
CREATE TABLE t1 (t1key INTEGER PRIMARY KEY,data TEXT,num double,timeEnter DATE);
INSERT INTO "t1" VALUES(1,'This is sample data',3.0,NULL);
INSERT INTO "t1" VALUES(2,'More sample data',6.0,NULL);
INSERT INTO "t1" VALUES(3,'And a little more',9.0,NULL);
CREATE TRIGGER insert_notes_timeEnter
After insert on notes begin update notes
set timeEnter = Datetime('now','localtime') where rowid=new.rowid; end;
COMMIT;
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.