标签:
在mysql中,每个命令之间都要留一点空格
如果是这样,
$query = "select * from books where " .$searchtype. "like‘%" .$searchterm. "%‘";
那么print_r(),就会输出:select * from books where titlelike‘%java%‘,
like 和那些都在一起了,命令有错,
应该是这样:
$query = "select * from books where " .$searchtype. " like ‘%" .$searchterm. "%‘";
print_()输出:select * from books where title like ‘%java%‘1
,成功。。
在like两边都要有空格。。
mysql出现) Notice: Trying to get property of non-object in E:\p错误的 原因
标签:
原文地址:http://www.cnblogs.com/tumio/p/4870475.html