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();
In reply to Re^5: Detecting 1 day ago
by EvanCarroll
in thread Detecting 1 day ago
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |