帮忙看意思sql语句中的like怎么使用?
语句如下:
$sql="select c.cid,c.cname,p.uid from `biz_channel` c,`pre_common_member_profile` p where p.resideprovince=c.cname and c.cmod='area' group by c.cid";
where p.resideprovince=c.cname 这里的条件我想改成like 也就是where p.resideprovince like c.cname
但是查询到的和用等于是相同的结果,正常应该比用“等于”查询到的结果更多才对。
我也尝试用where p.resideprovince like '%c.cname%' 和 where p.resideprovince like %c.cname% 都不行。
请问正确的应该怎么写??