Count table rows

后端 未结 11 2049
一个人的身影
一个人的身影 2020-11-28 21:55

What is the MySQL command to retrieve the count of records in a table?

11条回答
  •  伪装坚强ぢ
    2020-11-28 22:48

    $sql="SELECT count(*) as toplam FROM wp_postmeta WHERE meta_key='ICERIK' AND post_id=".$id;
    $total = 0;
    $sqls = mysql_query($sql,$conn);
    if ( $sqls ) {
        $total = mysql_result($sqls, 0);
    };
    echo "Total:".$total;`
    

提交回复
热议问题