Re: [sqlite] Trigger Questions

2010-09-03 Thread Michael Graßl
Thanks to all, no I only update createTime at the first Trigger and the updateTime get (as Igor said) set with the update Trigger which get performed with the create trigger. Best regards, Michael Am 02.09.10 22:32, schrieb Igor Tandetnik: Michael Graßlmich...@grassl.eu wrote: Am

[sqlite] Trigger Questions

2010-09-02 Thread Michael Graßl
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

Re: [sqlite] Trigger Questions

2010-09-02 Thread Pavel Ivanov
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

Re: [sqlite] Trigger Questions

2010-09-02 Thread Michael Graßl
Am 02.09.10 21:18, schrieb Pavel Ivanov: The correct syntax is UPDATE sites SET createTime = DATETIME('NOW'), updateTime = DATETIME('NOW') WHERE rowid = new.rowid; Thanks this works. So I wonder if you made a typo and actually only createTime were updated when updateTime

Re: [sqlite] Trigger Questions

2010-09-02 Thread Igor Tandetnik
Pavel Ivanov paiva...@gmail.com wrote: 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. The original

Re: [sqlite] Trigger Questions

2010-09-02 Thread Igor Tandetnik
Michael Graßl mich...@grassl.eu wrote: Am 02.09.10 21:18, schrieb Pavel Ivanov: The correct syntax is UPDATE sites SET createTime = DATETIME('NOW'), updateTime = DATETIME('NOW') WHERE rowid = new.rowid; Thanks this works. So I wonder if you made a typo and actually only

Re: [sqlite] Trigger Questions

2010-09-02 Thread Max Vlasov
On Fri, Sep 3, 2010 at 12:29 AM, Igor Tandetnik itandet...@mvps.org wrote: The correct syntax is UPDATE sites SET createTime = DATETIME('NOW'), updateTime = DATETIME('NOW') WHERE rowid = new.rowid; It's interesting, I once did a similar error with UPDATE (typing field1=.. and