You are obviously trying to use date functions but you're not telling mysql which function you want to use.
has them all and their meanings. You'll probably want DATE_SUB().
also, "AND AND" will give you errors. and " is not the quote char for mysql, it's '
my $sth = $dbh->prepare("SELECT * FROM table WHERE field = ?");
$sth->execute( $fieldvalue );
and ? will magically be replaced by $fieldvalue and DBI will take care of escaping special chars and quote it correctly.