in reply to Re^4: Detecting 1 day ago
in thread Detecting 1 day ago
See exists clause if mysql supports it, and if you can make it better fits your needs..my $sth = $dbh->prepare( q{SELECT 1 FROM messages WHERE DATE_SUB(CURDA +TE(),INTERVAL 1 DAY) <= message_data LIMIT 1; } ); $sth->execute(); print "We got it" if $sth->rows();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Detecting 1 day ago
by Anonymous Monk on Feb 25, 2006 at 05:21 UTC |