21,886
社区成员
发帖
与我相关
我的任务
分享
if($major!=""){
$query.=' and (major like "%'.$major.'%")';
}
if($area!=""){
$query.=' and (area like "%'.$area.'%")';
}
if($cpname!=""){
$query.=' and (company_name like "%'.$cpname.'%")';
}
if($tel!=""){
$query.=' and (telphone="'.$tel.'")';
}
if($contactor!=""){
$query.=' and (contactor="'.$contactor.'")';
}
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE company ALL NULL NULL NULL NULL 2383828 Using where
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE company ALL NULL NULL NULL NULL 2383828 Using where
$sql = 'SELECT count(1) as cnt FROM company WHERE 1=1 ';
$sql.= $query;
$cnt = $GLOBALS['db']->getOne($sql);
$sql = 'SELECT company_name,url,address FROM company WHERE 1=1 ';
$sql.= $query;
$sql.= ' limit '.(($page-1) * $size).",".$size;
$sql = 'SELECT count(*) as cnt FROM company WHERE 1=1 ';