2019-02-25
阅读量:
814
SQL语句报错
问题描述:
$sql="select * from student where studentid={$studentid} and likeclassid={$classid}";
报错如下:
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 'and likeclassid=1176' at line 1
解决方法:
语法上应为 classid like {$classid}
但既然是like了就要模糊匹配,取决于你想匹配的内容使用%,*。






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论