php文件里 sql语句怎么判断字段和div内容相同
这是我的sql语句:
$sql = "SELECT id,vote_id,openid,uid,username,image,telephone,resume,ip,check_state,total_poll_count,create_time,openid,img_size,$group FROM ".tablename('qf_vote_join')." WHERE (is_delete = 0 or is_delete is null) and vote_id = :voteid AND (check_state = 2 OR check_state = 4) end(group=groupsbut on) ORDER BY total_poll_count DESC LIMIT ".$start.",".$limit;
(group=groupsbut on)
group是我的字段名,groupsbut on是我的div里的文字
先获取div里内容,然后在sql语句里使用判断。发一段代码看看
<?php
//取得指定位址的內容,并储存至 $text
$text=file_get_contents('//www.jb51.net/');
//去除换行及空白字符(序列化內容才需使用)
//$text=str_replace(array("/r","/n","/t","/s"), '', $text);
//取出 div 标签且 id 为 PostContent 的內容,并储存至二维数组 $match 中
preg_match('/
end(group=groupsbut on) 不应该是and吗?