count number of rows in table using php

前端 未结 6 639
一生所求
一生所求 2020-12-20 00:00

I just want to count the number of rows in a table that already created in a database using php. I used mysqli(). I need the number of rows in the table as the output.

6条回答
  •  眼角桃花
    2020-12-20 00:08

    If you dont want to use COUNT in SQL, you can just select all rows (SELECT id FROM table) and then just use PHP count().

提交回复
热议问题