Can Not Show Mysql Bit Type

Dear all,

I use mysql workbench and I have active field which attribute is bit type,when I display view, it just display the idnews,the active is null,hope you check my code to display active value, here is my code.

Model attributes:





   public function actionIndex(){

	$model = News::model()->findAll();	






<?php if($models != null): ?>

<?php foreach($models as $model): ?>

<?php echo($model->idnews);echo($model->active);die;?>

<?php endforeach; ?>

<?php endif; ?>

the value in datbase.

 idnews   title   active

  26       test     1

thankyou very much

You could do var_dump($model->active) to check the data type of it’s value.

yes,I have do var_dum to check it already, but it display null.