如下的数据表

create table `test`(

  `id` int(11) not null auto_increment primary key,

  `user` varchar(100) not null,

  `flag` char(2) not null default 'ok'

);

当查询时应该写成

$sql = "select `user` from `test` where `flag`='ok' ";

字段是数据表的,用 (反向引号)(`),与别的指定字符相比时用 (引号)(')

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-10-16
  • 2021-12-22
  • 2021-10-19
相关资源
相似解决方案