写了一个简单的登录验证,居然搞了半天,还各种查mysqli num_rows,还以为是num_rows出问题,后面在如图所示后面加了条是否存在结果集的判断,运行下,错误结果出来了,就明白是$sql有问题。

  错误显示:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$sql' at line 11064


php新手之遇到的问题

单引号加$sql,我也是醉了...,去掉单引号,OK!

转载于:https://blog.51cto.com/7080696/1886438

相关文章:

  • 2022-02-17
  • 2021-05-03
  • 2022-12-23
  • 2021-10-03
  • 2021-03-27
  • 2021-04-11
  • 2021-09-03
  • 2021-11-05
猜你喜欢
  • 2021-06-08
  • 2021-07-29
  • 2022-01-02
  • 2021-08-23
  • 2022-12-23
  • 2021-11-10
  • 2021-05-12
相关资源
相似解决方案