John Morgan wrote:
> Good point. My method would make the data more readable in the database but 
> your method would be more flexible.

More readable? The copy-pasted example below uses some non-standard 
extensions like week and century, but you will get the point:

test=# create table ivtest (test interval);
test=# insert into ivtest values ('1 week 3 days 2 hours 45 seconds');
test=# insert into ivtest values ('1 century 2 years 4 months 42 week 3 
days 17 hours 33 seconds');
test=# select * from ivtest;
                 test
------------------------------------
  10 days 02:00:45
  102 years 4 mons 297 days 17:00:33

test=# select sum(test) from ivtest;
                 sum
------------------------------------
  102 years 4 mons 307 days 19:01:18


Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to