php

php

如何筛选条件

PHP老夏夏 发表了文章 • 0 个评论 • 1379 次浏览 • 2018-02-06 16:41 • 来自相关话题

?该版本应该没有任何bug
? public function where($sessionName,$data){

if($data == '' && !Request::instance()->isPost()){
$where = Session::get(
$sessionName);
}else{
$where = $data;
Session::set($sessionName,$where);
}
return $where;
}


以下是调用where方法
? $fromname = ltrim(input('fromname'));
$content = ltrim(input('content'));

$where['room_id'] = Session::get('room_id');

$where['content'] = $this->where('msg_content',$content);
if($where['content'] == ''){
unset($where['content']);
}else{
$content = $where['content'];
}

$where['fromname'] = $this->where('msg_fromname',$fromname);

if($where['fromname'] == ''){
unset($where['fromname']);
}else{
$fromname = $where['fromname'];
} 查看全部
?该版本应该没有任何bug
?
 public function where($sessionName,$data){

if($data == '' && !Request::instance()->isPost()){
$where = Session::get(
$sessionName);
}else{
$where = $data;
Session::set($sessionName,$where);
}
return $where;
}


以下是调用where方法
?
        $fromname = ltrim(input('fromname'));
$content = ltrim(input('content'));

$where['room_id'] = Session::get('room_id');

$where['content'] = $this->where('msg_content',$content);
if($where['content'] == ''){
unset($where['content']);
}else{
$content = $where['content'];
}

$where['fromname'] = $this->where('msg_fromname',$fromname);

if($where['fromname'] == ''){
unset($where['fromname']);
}else{
$fromname = $where['fromname'];
}

如何筛选条件

PHP老夏夏 发表了文章 • 0 个评论 • 1379 次浏览 • 2018-02-06 16:41 • 来自相关话题

?该版本应该没有任何bug
? public function where($sessionName,$data){

if($data == '' && !Request::instance()->isPost()){
$where = Session::get(
$sessionName);
}else{
$where = $data;
Session::set($sessionName,$where);
}
return $where;
}


以下是调用where方法
? $fromname = ltrim(input('fromname'));
$content = ltrim(input('content'));

$where['room_id'] = Session::get('room_id');

$where['content'] = $this->where('msg_content',$content);
if($where['content'] == ''){
unset($where['content']);
}else{
$content = $where['content'];
}

$where['fromname'] = $this->where('msg_fromname',$fromname);

if($where['fromname'] == ''){
unset($where['fromname']);
}else{
$fromname = $where['fromname'];
} 查看全部
?该版本应该没有任何bug
?
 public function where($sessionName,$data){

if($data == '' && !Request::instance()->isPost()){
$where = Session::get(
$sessionName);
}else{
$where = $data;
Session::set($sessionName,$where);
}
return $where;
}


以下是调用where方法
?
        $fromname = ltrim(input('fromname'));
$content = ltrim(input('content'));

$where['room_id'] = Session::get('room_id');

$where['content'] = $this->where('msg_content',$content);
if($where['content'] == ''){
unset($where['content']);
}else{
$content = $where['content'];
}

$where['fromname'] = $this->where('msg_fromname',$fromname);

if($where['fromname'] == ''){
unset($where['fromname']);
}else{
$fromname = $where['fromname'];
}