public function actionIndex($id=null)
{
$model = new Posts('search');
$crumbs = array(
array('name' => "Home", 'url' => array('site/index')),
array('name' => 'Post Search'),
);
$title = "Post Search";
$criteria = new CDbCriteria();
$condition="";
if($id !=null){
$model->specialty_id = $id;
}
if(isset($_POST['Posts'])){
if($_POST['Posts']['specialty_id'] !="-1"){
$model->specialty_id = $_POST['Posts']['specialty_id'];
}
if($_POST['Posts']['location_id'] !="-1"){
$model->location_id = $_POST['Posts']['location_id'];
}
if($_POST['Posts']['grade_id'] !="-1"){
$model->grade_id = $_POST['Posts']['grade_id'];
}
if($_POST['Posts']['pay_amount'] !=""){
$model->pay_amount = $_POST['Posts']['pay_amount'];
}
}
can anyone explain me this code.I cant understand it.what’s the meaning of !=-1.pls explain this code.
thanx in advance.