Yii Framework Forum: Parse Error in Datatbale - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Parse Error in Datatbale i got Parse Error in datatable but couldnt figar it

#1 User is offline   manisha 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 25-June 12

Posted 25 June 2012 - 04:52 AM

helloo all

I got an error i got parse error in e-datatable but can't solve it if any one has any idea about pls tell me

For more i idea i have below code:


public function actionDatatable()
{

$criteria = new CDbCriteria;
if (isset($_REQUEST['sSearch']) && isset($_REQUEST['sSearch']{0})) {

$criteria->addSearchCondition('textColumn', $_REQUEST['sSearch'], true, 'AND', 'LIKE');
}





$sort = new EDTSort('User', array('user_name','address'));

$pagination = new EDTPagination();

$dataProvider = new CActiveDataProvider('User', array(
'criteria' => $criteria,
'pagination' => $pagination,
'sort' => $sort,
));


$widget=$this->createWidget('ext.EDataTables.EDataTables', array(
'id' => 'user',
'dataProvider' => $dataProvider,
'ajaxUrl' => Yii::app()->request->getBaseUrl().'/user/datatable',
'columns' => array('user_name','address'),
));

if (!Yii::app()->getRequest()->getIsAjaxRequest()) {

$this->render('datatable', array('widget' => $widget));
return;
} else {
json_encode($widget->getFormattedData(intval($_REQUEST['sEcho'])));
Yii::app()->end();
}
}
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users