Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The error is " Can't call method "rows" on an undefined value at...."$sqlstatement=qq~ SELECT Tarikh, StatusType, ProblemCategory, SubProblem, Pr +oblemSolution FROM daftarstatus WHERE ICNumber = "$ICNumber" AND CompanyRegistrationNumber = "$CompanyReg +istrationNumber" ~; $sth = $dbh_base_app->prepare($sqlstatement); $sth->execute() or &error("SQL","Couldn't execute statement: $DBI: +:errstr"); if($sth2->rows() <= 0) { $sth2= $dbh_base_app->prepare($sqlstatement2); $sth2->execute() or &common_error("$sqlstatement2","Couldn't execute s +tatement1: $DBI::errstr",1); $number = 0; while(($Tarikh, $StatusType, $ProblemCategory, $SubProblem, $ProblemS +olution) = $sth2->fetchrow_array()) { $number++;
Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Don't understand row
by sgifford (Prior) on Feb 14, 2005 at 04:51 UTC | |
|
Re: Don't understand row
by Zaxo (Archbishop) on Feb 14, 2005 at 04:58 UTC | |
by Anonymous Monk on Feb 14, 2005 at 05:06 UTC | |
by Zaxo (Archbishop) on Feb 14, 2005 at 05:15 UTC | |
|
Re: Don't understand row
by murugu (Curate) on Feb 14, 2005 at 04:53 UTC | |
|
Re: Don't understand row
by K_M_McMahon (Hermit) on Feb 14, 2005 at 05:01 UTC |