标签:isa art cti find article title log turn condition
public function page() { if (Request::instance()->isAjax()){ $title = " 1=1 "; if(!empty($_POST["title"])){ $name = " title like ‘%".$_POST["title"]."%‘ "; } $condition = " {$title} "; $arr = Db::name(‘article‘)->field(" count(*) as num ")->where($condition)->find(); echo ceil($arr["num"]/6).chr(2).$arr["num"]; } }
public function click() { if (Request::instance()->isAjax()){ $page = $_POST["page"]; $title = " 1=1 "; if(!empty($_POST["title"])){ $name = " title like ‘%".$_POST["title"]."%‘ "; } $condition = " {$title} "; $arr = Db::name(‘article‘)->where($condition)->page($page,6)->select(); Return($arr); } }
标签:isa art cti find article title log turn condition
原文地址:http://www.cnblogs.com/yi11/p/7460924.html