no rows selected
From: Mark Martin (mark.martin_at_nuim.ie)
Date: 01/28/05
- Next message: Thomas Bätzler: "RE: Trapping Windows Web Activity"
- Previous message: O-Dzin Tridral: "Converting a text file for printing"
- Next in thread: mgoland_at_optonline.net: "Re: no rows selected"
- Maybe reply: mgoland_at_optonline.net: "Re: no rows selected"
- Reply: Todd W: "Re: no rows selected"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 28 Jan 2005 15:22:05 +0000 To: beginners@perl.org
Hi,
I'm running a test to see whether certain criteria in a SELECT statement
return record or not. If I get a "no rows selected" from SQL then I want to
perform a specific action . But I don't how perform the test for "no rows
selected " ?
$sql = qq{SELECT RECORD FROM TABLE WHERE FIELD = ? } ;
$sth = $dbh->prepare($sql) ;
$sth->execute($variable) ;
while (@fetch = $sth4->fetchrow)
{
if ("no rows selected " .................?????? ) ### Don't know how to
test this
{
#perform my tasks
}
Regards,Mark
- Next message: Thomas Bätzler: "RE: Trapping Windows Web Activity"
- Previous message: O-Dzin Tridral: "Converting a text file for printing"
- Next in thread: mgoland_at_optonline.net: "Re: no rows selected"
- Maybe reply: mgoland_at_optonline.net: "Re: no rows selected"
- Reply: Todd W: "Re: no rows selected"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]