The correct syntax is UPDATE sites SET createTime = DATETIME('NOW'), updateTime = DATETIME('NOW') WHERE rowid = new.rowid;
So I wonder if you made a typo and actually only createTime were updated when updateTime remained unchanged. Pavel On Thu, Sep 2, 2010 at 3:11 PM, Michael Graßl <mich...@grassl.eu> wrote: > Hello > > > > I tried to update 2 colums of my recently added row in my table sites. > The colums are createTime and updateTime, but sqlite only sets > updateTime, the other colum stay plain. Sqlite doesn't complain about > anything so I don't know whats wron. > > > CREATE TRIGGER insert_sites_createTime AFTER INSERT ON sites > BEGIN > > UPDATE sites SET createTime = DATETIME('NOW') AND updateTime = > DATETIME('NOW') > WHERE rowid = new.rowid; > > END; > > best regards, > Michael Grassl > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users