From: Dave P. <dpo...@te...> - 2003-08-01 13:19:00
|
I'm trying to create a record in a database with a 'expires' field, which records are deleted whenever expires <= NOW(). I seem to have difficulty grasping how I can generate a query similar to: UPDATE records SET expires = NOW() + INTERVAL 30 DAY; I've tried something like: Records.expires = func.NOW('INTERVAL 30 DAY') Records.expires = func.NOW() + 'INTERVAL 30 DAY' Records.expires = func.NOW() + '+ INTERVAL 30 DAY' Records.expires = func.DATE_ADD(func.NOW(),'INTERVAL 30 DAY') as well as many other combinations, but none of them seemed to work. Any suggestion? -Dave. btw, how does one access the raw database connection from a SQLObject? I know I somehow have to go thru _connection and then something else, but everytime I've tried using _runWithConnection or something similar I always end up with an error of some kind. |