in reply to Date subtraction (intervals) w/Class::DBI
Also, what type have you used for the created_on field? If you set its type to TIMESTAMP, then MySQL will automatically update it.Company->add_constructor( get_recent => 'DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= created_on ' );
Update - This automatic update will only happen if created_on is the 1st TIMESTAMP field in the table.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date subtraction (intervals) w/Class::DBI
by saberworks (Curate) on Oct 16, 2004 at 00:25 UTC | |
|
Re^2: Date subtraction (intervals) w/Class::DBI
by waswas-fng (Curate) on Oct 15, 2004 at 18:02 UTC |