I am using Yii framework.
/view/update.php
<?php
echo CHtml::beginForm();
foreach ($items as $i=>$item):
echo '<tr>';
echo '<td>'.$item['name'].'</td>';
echo '<td>'.$item['c1'].'</td>';
echo '<td>'. count(cos::model()->findAll(array(
'condition'=>'cos2='.$item['id'],))).'</td>';
echo '<td>'. CHtml::activeCheckBox($item, "[$i]c2").'</td>';
echo '<td>'. CHtml::activeCheckBox($item, "[$i]c3").'</td>';
echo '<td>'. CHtml::activeCheckBox($item, "[$i]c4").'</td>';
echo '<td>edit</td>';
echo '</tr>';
endforeach;
echo '</table>';
echo CHtml::submitButton('Save');
echo CHtml::endForm();
?>
how can I write all the records at once?