Hi there,
I write sql as below, but I cannot render the view. I can see the error message via firebug: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must to be declared in the document or in the transfer protocol."
Can anybody please help me!!!
controller:
$command = Yii::app()->db->createCommand('select concept_id from {{module_concept}}');
$dataReader = $command->query();
$data = $dataReader->readAll();
$dataProvider = new CArrayDataProvider($data, array(
'pagination' => array(
'pageSize' => 10,
)));
view:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_item',
)); ?>
_item.php
<div><?php echo $data->concept_id;?></div>