search

Home  >  Q&A  >  body text

How to write the code to query the number of records in a table in a MySQL database?

image.png

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

无花果树无花果树1878 days ago1344

reply all(6)I'll reply

  • 阿亮

    阿亮2019-11-06 14:14:22

    It seems that your sql variable is not assigned a value

    reply
    0
  • 申海强

    申海强2019-11-04 17:49:37

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

    reply
    0
  • 卢小强

    卢小强2019-11-04 08:38:11

    Why can’t I reply?

    reply
    0
  • 卢小强

    SELECT count(*) from DATABASE 用count

    卢小强 · 2019-11-04 08:38:50
    无花果树

    I tried count but it still doesn’t work.

    无花果树 · 2019-11-04 18:23:14
    卢小强

    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.

    卢小强 · 2019-11-05 08:40:41
  • Cancelreply