Well, that''s one way to look at it, but
Select * from my_table where modified_on is null
Would return all rows that exist but have not been modified since
creation
I suppose you could do
Select * from my_table where modified_on = created_on
But I''m a purist... If the record hasn''t been modified, then
the field
should be null... Because if I don''t store the time in that field and a
user edits it on the same day as creation, then we have no way of really
knowing that it was changed without using a separate history table.
Brian Hogan
Web Development
Learning & Technology Services
Schofield 3-B
University of Wisconsin-Eau Claire
-----Original Message-----
From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On
Behalf Of Kyle Maxwell
Sent: Monday, September 19, 2005 1:30 PM
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Subject: [Rails] Created_on suggestion
Shouldn''t the modified_on be set to the creation date on_create, rather
than being left null? That would be consistant with my expectations.
It would also make it easier to sort lists by last modified date, in the
traditional filesystem sense.
Kyle Maxwell
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails