Dave Johnson on open web technologies, social software and software development
« JRoller upgrade this... | Main | JRoller upgrade on... »
I've got a table that looks like this:
create table comment ( id varchar(48) not null primary key, entryid varchar(48) not null, name varchar(255) null, email varchar(255) null, url varchar(255) null, content text null, posttime timestamp not null, spam bit default 0 not null, remotehost varchar(128) null );And I want to set the spam field in all rows to false like so:
update comment set spam=false;But that command also resets all of the posttime fields in the table to the current time. If I use the following command, my posttime fields are preserved.
update comment set spam=false, posttime=posttime;What's up with that? Why does an update of one field affect other fields?
Dave Johnson in General
03:57AM May 29, 2004
Comments [4]
Tags:
General
This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog
Below are the most recent entries in the category General, some may be related to this entry.
The Fine Manual does a decent job of explaining why:
Posted by John Beimler on May 29, 2004 at 12:11 PM EDT #
Posted by Dave Johnson on May 29, 2004 at 12:26 PM EDT #
Posted by Koz on May 30, 2004 at 08:19 PM EDT #
Posted by Vinicios Torres on May 31, 2004 at 12:19 PM EDT #