1 两个字段联合查询
$where .= " and (m.family_name like '%".$friend_name."' or m.first_name like '%".$friend_name."' or CONCAT(m.family_name,m.first_name) like '%".$friend_name."%'
2 查询重复项并删除
select question_content,count(0) n from test_question group by question_content having n>1 order by n desc
delete from test_question where question_id in (select tid from (select max(question_id) tid,count(0) n from test_question group by question_content having n>1) dt )
联系客服