![]() |
Alexey admin 9/27/2006 |
Hi, else if(@$_SESSION[$strTableName."_search"]==2) // advanced search { $sWhere=""; foreach(@$_SESSION[$strTableName."_asearchfor"] as $f => $sfor) { $strSearchFor=trim($sfor); $strSearchFor2=""; $type=@$_SESSION[$strTableName."_asearchfortype"][$f]; if(array_key_exists($f,@$_SESSION[$strTableName."_asearchfor2"])) $strSearchFor2=trim(@$_SESSION[$strTableName."_asearchfor2"][$f]); if($strSearchFor!="" || true) { if (!$sWhere) { if($_SESSION[$strTableName."_asearchtype"]=="and") $sWhere="1=1"; else $sWhere="1=0"; } $strSearchOption=trim($_SESSION[$strTableName."_asearchopt"][$f]); if($where=StrWhereAdv($f, $strSearchFor, $strSearchOption, $strSearchFor2,$type)) { if($_SESSION[$strTableName."_asearchnot"][$f]) $where="not (".$where.")"; if($_SESSION[$strTableName."_asearchtype"]=="and") $sWhere .= " and ".$where; else $sWhere .= " or ".$where; } } } $strSQL = AddWhere($strSQL,$sWhere); echo $sWhere; }
|
T
|
thesofa author 9/27/2006 |
thanks Sergey, I shall have to leave that one unless someone else can come and help, I think showing 1=1 and upper(`detentions`.`TutorGroup`) like upper('%8%') and `detentions`.`DateGiven`>='2006-09-18 00:00:00' and `detentions`.`DateGiven`<='2006-09-22 00:00:00' and `detentions`.`DayForDetention`>='2006-09-25 00:00:00' and `detentions`.`DayForDetention`<='2006-09-29 00:00:00' and not (`detentions`.`Done`=1)
|