On 6/1/2011 3:31 PM, Jim Mellander wrote: > CREATE TABLE ip_timestamps (ip text unique, timestamp date); > CREATE UNIQUE INDEX ip_index on ip_timestamps (ip ASC); > CREATE TRIGGER ts_update after update on ip_timestamps when > NEW.timestamp< OLD.timestamp BEGIN update ip_timestamps set timestamp > = OLD.timestamp; END;
This updates all rows, not just the one on which the trigger was fired. Is this intentional? You might want something lile update ip_timestamps set timestamp = OLD.timestamp where rowid = NEW.rowid; -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users