Hi,
Can anyone help me out with this one. All I want to do is delete a record depending on a condition, but I can't get it to work - it's giving me the following errors:
Can't use an undefined value as a HASH reference at /path/to/admin/GT/SQL/Table.pm line 2219.
[Tue Aug 28 20:13:16 2001] [error] [client 192.168.1.224] Premature end of script headers: /path/to/myscript.cgi
I have a field in my db called "Created" that is a type timestamp(10). What I want to do is delete any records in the database that are more than 15 minutes old. This is what I've got so far - first getting the time and then deleting the record. If I'm going about it the wrong way please let me know...
my $oldtime = GT::Date::date_get (time - 60, "%yy%%mm%%dd%%HH%%MM%");
my $condition = new GT::SQL::Condition ( 'Created', '<', "$oldtime" );
my $result = $adb->delete ( $condition );
Cheers,
Regan.
Can anyone help me out with this one. All I want to do is delete a record depending on a condition, but I can't get it to work - it's giving me the following errors:
Can't use an undefined value as a HASH reference at /path/to/admin/GT/SQL/Table.pm line 2219.
[Tue Aug 28 20:13:16 2001] [error] [client 192.168.1.224] Premature end of script headers: /path/to/myscript.cgi
I have a field in my db called "Created" that is a type timestamp(10). What I want to do is delete any records in the database that are more than 15 minutes old. This is what I've got so far - first getting the time and then deleting the record. If I'm going about it the wrong way please let me know...
my $oldtime = GT::Date::date_get (time - 60, "%yy%%mm%%dd%%HH%%MM%");
my $condition = new GT::SQL::Condition ( 'Created', '<', "$oldtime" );
my $result = $adb->delete ( $condition );
Cheers,
Regan.