DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at ./recieveTxn.cgi
line 168.
을 던지고있다
. 행의 끝에 멈추는 루프를 말하지 않는 것이 거의 비슷하지만, 나는 다른 것과 마찬가지로 그것을 작성했습니다.
그래서 예를 들면 : 쿼리는shortcode2
shortcode3
shortcode1 끌어 것이 다음 문제는 당신이에서 하나 개 이상의 행을 처리하는 것입니다
$sql = "
SELECT
aPI.folder AS aPIfolder,
aPI.rowNum AS aPIrowNum,
hasInput,
evalCode
FROM
aPersonalItems as aPI
LEFT JOIN
pItems_special_inputs as SI
ON
aPI.folder = SI.folder AND
aPI.rowNum = SI.rowNum
WHERE
hasInput=1 AND
aPI.folder='$FORM{'folder'}'
ORDER BY
aPI.rowNum
";
$sth = $dbh->prepare($sql);
$sth->execute();
my ($shortcoderow, $row);
my $shortcodeSQL = "
SELECT
*
FROM
pItemsShortCodes
WHERE
folder='$FORM{'folder'}'
ORDER BY
rowNum
";
my $shortcodeSTH = $dbh->prepare($shortcodeSQL);
$shortcodeSTH->execute();
while(my $ref = $sth->fetchrow_hashref()) {
my $shortCode;
my $isblank = 1;
my $rowNum = $ref->{'aPIrowNum'};
while(my $shortcodeRef = $shortcodeSTH->fetchrow_hashref())
#&& $rowNum == $shortcodeRef->{'rowNum'}) #line 168 above
{
$shortCode=$shortcodeRef->{'shortcode'};
print $shortCode."\n";
}
$shortcodeSTH->finish();
}
'while' 루프 안에서'finish()'무엇을하고 있습니까? – Mat