$sqlstatement=qq~ SELECT Tarikh, StatusType, ProblemCategory, SubProblem, ProblemSolution FROM daftarstatus WHERE ICNumber = "$ICNumber" AND CompanyRegistrationNumber = "$CompanyRegistrationNumber" ~; $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 statement1: $DBI::errstr",1); $number = 0; while(($Tarikh, $StatusType, $ProblemCategory, $SubProblem, $ProblemSolution) = $sth2->fetchrow_array()) { $number++;