How to write the code to query the number of records in a table in a MySQL database?
无花果树
无花果树 2019-11-03 10:48:33
0
6
1434

image.png

Writing like this won’t work and an error will be reported!

无花果树
无花果树

reply all(3)
阿亮

It seems that your sql variable is not assigned a value

申海强

Beijing Lanmo Technology is urgently recruiting PHP, contact person is 13520658641, email: 1468993918@qq.com

卢小强

Why can’t I reply?

  • reply SELECT count(*) from DATABASE 用count
    卢小强 author 2019-11-04 08:38:50
  • reply I tried count but it still doesn’t work.
    无花果树 author 2019-11-04 18:23:14
  • reply Don't you use COUNT to output it to see if there are any results? No results indicate that the SQL statement is written incorrectly.
    卢小强 author 2019-11-05 08:40:41
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template