木子卜—个人博客

php获取数据库表中总行数

<?php 
 
    require("config.php");
 
    $sql = "SELECT count(*) FROM api_list";
    $result = mysqli_query($conn,$sql);
    $rows = mysqli_fetch_row($result);
    $rowcount = $rows[0];
    echo $rowcount;

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »