• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

函数代码详细求解解决办法

php 搞代码 3年前 (2022-01-24) 42次浏览 已收录 0个评论

函数代码详细求解
请高手帮忙详细解释下段代码
public function fetch_all_by_sql($where, $order = ”, $start = 0, $limit = 0, $count = 0, $alias = ”)
{
$where = $where && !is_array($where) ? ” WHERE $where” : ”;
if(is_array($order)) {
$order = ”;
}
if($count) {
return DB::result_first(‘SELECT count(*) FROM ‘.DB::table($this->_table).’ %i %i %i ‘.DB::limit($start, $limit), array($alias, $where, $order));
}
return DB::fetch_all(‘SELECT * FROM ‘.DB::table($this->_table).’ %i %i %i ‘.DB::limit($start, $limit), array($alias, $where, $order));
}

发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址