Just a note on this. This does not work with all dbd's the version of
DBD::ODBC I work with is one where it will not work. No matter how many rows
are actually returned, $rows will always be -1 on this dbd. This is hinted
at in perldoc DBI by the use of "if available" in the descriptions of this
technique, but I just thought I should call it out...just in case.
Steve H.
-----Original Message-----
From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 9:00 PM
To: [EMAIL PROTECTED]
Subject: Truth and SQL
Hi list,
Basically I want to be able to do an SQL query and if the query returns no
results I want my script to say Ok your query rerurned 0 results print this
message... "Sorry your seach returned no messages".
What is my best way of going about this? Would it work similar to this...
Do search ....
if (!$sql_search) {
print "Sorry your result returned no matches"';
else {
print "here are the results";
$sql_search;
}
}
Any suggestions will help imensly,
Regards,
df
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]