$fcc172= new FC_SQL_ALL("172","BL");
$sql = "select dsphh,dspmc,dsppp,dspgg,dlsj from sp_xxhz where dshh='900002' and isvalid='01' and djyzt='01' and xjbz='01'";
if(isset($this->queryString['type'])){
$sql.= " and dsphh ='".$keywords."' ";
}else{
$sql.= " and dkey like '%".$keywords."%' ";
}
$sql.= ' order by dsppp';
$totalQuery = new FC_SQL_ALL('172','BL');
$totalQuery->query($sql);
$data['total'] = $totalQuery->num_rows();
$totalQuery->close();
$fcc172->cursor_query("xxxx",$sql,$pagesize,$page);
while($fcc172->next_record()){
$data['rows'][] = array(
'dsphh' =>$fcc172->f(0),
'dspmc' =>iconv('gb2312','utf-8',$fcc172->f(1)),
'dsppp' =>iconv('gb2312','utf-8',$fcc172->f(2)),
'dspgg' =>iconv('gb2312','utf-8',$fcc172->f(3)),
'dlsj' =>$fcc172->fnum(4)
);
}
$fcc172->cursor_close("xxxx");