Hi, I have three conditions in search weather the condition will come or not, how to write condition for this please help me
$sessionid=$this->request->getQuery("sessionid");
$listingid=$this->request->getQuery("listingid");
$userid=$this->request->getQuery("userid");
$parameters = $this->persistent->parameters;
if (!is_array($parameters)) {
$parameters = array();
}
if($sessionid){
$parameters["conditions"] = 'sessionid = '.$sessionid;
}
if($listingid){
$parameters["conditions"] = 'listingid = '.$listingid;
}
if($sessionid){
$parameters["conditions"] = 'userid = '.$userid;
}
$parameters["order"] = "id";
$parameters["columns"] = 'id,name,status,is_featured';
$users = Users::find($parameters);