分類彙整: 未分類

Count 範例

if(count($_POST)>0 && $_POST[“submit"]=="Count") {

$pdoStatement = $pdo->prepare(“SELECT Count(*) as count FROM address_book“);
$pdoStatement->execute();

//撈資料
while($row = $pdoStatement->fetch(PDO::FETCH_ASSOC) ) {
echo “count=".$row[count];
}
}

課程投影片