echo "<h2 style='margin:0; padding:0;'>Recent Comments</h2>";
if ($sth7->rowCount()) {
while($row7 = $sth7->fetch(PDO::FETCH_ASSOC)) {
echo "<div class='comment'>{$row7['usr']} said";
}
}
else($sth7->rowCount() = 0)
echo "User";
Can't use method return value in write context
爲什麼不行rowcount()= 0邏輯工作?RowCount()= 0錯誤php mysql
這不起作用:'別人($ sth7->的行數()== 0){\t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t \t回聲 「用戶」; \t \t \t \t} – JohnPaul
它竄取相同的錯誤 – JohnPaul
它應該是'else if($ sth7-> rowcount()== 0)'(或者只是'else') – a1ex07