tp5,原生SQL,绑定参数

浏览:132 发布日期:2017/08/11 分类:ThinkPHP5专区 关键字: tp5
$this->query('select * from user where `username` = %s',[$username]);


SQLSTATE[42000]: Syntax error or access violation: 1064 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 '%s' at line 1

到底该怎么写?
最佳答案
评论( 相关
后面还有条评论,点击查看>>