$patient=new patient();
$db=$patient->getAdapter();
$where=$db->quoteInto('patientname like ?',"%".trim(GetSQLValueString($_POST['name'],"text"))."%");
$where=$where.$db->quoteInto('and sex=?',$_POST['sex']);
$where=$where."and age between 0 and 5";
$this->view->patients=$patient->fetchAll($where,$order,$count,$offset)->toArray();