On Tue, 2 Jun 2009 12:28:31 -0700 (PDT), Boris Ioffe
<[email protected]> wrote:
>
> Kees,
> Thank you very much for quick prototype. I will use single
> quotes from now on. It turns out Igor was right.
> I had another trigger.
Yes, always read Igor's replies first ;)
Triggers are very powerful, yet tricky. Nevertheless, I
think it's a good idea to use TRIGGERs (and CONSTRAINTs) as
much as possible instead of application code.
>CREATE TRIGGER insert_players_timeStamp AFTER INSERT ON players
>BEGIN
> UPDATE players SET create_ts = DATETIME('NOW', 'localtime')
> WHERE rowid = new.rowid;
>END;
>
>
> it ticked another update trigger. I found workaround by
> adding UPDATE OF clause for a specific field
>
>CREATE TRIGGER validate_players_update_role BEFORE UPDATE OF role ON players
>........
>
>Now I even understand why it works.
>Thanks a lot,
You're welcome, have fun.
>-B
--
( Kees Nuyt
)
c[_]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users