I'm a newbie myself, but if I understand you correctly, you just need to
check if the SQL query returns a defined value?
simply:
if (!defined($sql)){
do something...
}
else {
do something else
}
or:
print "sorry" if !defined($sql);
print "Yippee" if defined($sql);
Joni
-Original
Use crontab (unix command, which executes a given script automatically in
given times) to invoke a shell script... Maybe this can be done in perl as
well, I don't know, but I'd use a simple shell script for this kind of jobs.
Hope this helps,
Joni
-Original Message-
From: Pavan Kumar Ho
Take the safe option and assign the SQL query to a string before using it.
The placeholders are ok with this as well.
my $sql = qq(select * from testami where ? = ? and ? = ?);
$sth = $dbh -> prepare($sql);
$sth -> execute($field1, $value1, $field2, $value2);
#$sth -> execute();
Hope you didn