Daniel Falkenberg wrote:
>
> I would like to be able to test my SQL query for truth. To do this I would
> like to be able to do a SELECT query and if the colunm contains nothing I
> would like my script to be able to return and tell me this. As an example.
> if I do a SELECT statement as follows.
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