I have some datas stored in my table Jobs. How can I display them in a tabular form in my view section? I have visited the Yii forums but have not got any specific options to perform the action.
The action for view job:
public function actionViewJob() {
$criteria = "";
$model = new ViewJob();
/* What Should I do Here */
$this->render('viewjob', array(
'model' => $model
));
}
And the corresponding view to list data from database:
/* What should I do Here. */
<h1>View Jobs</h1>
<div class="flash-success"></div>
<div class="form">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="filtertable" style="float: left;">
<thead>
<tr>
<th width="11%" class="rowtop">No</th>
<th width="24%" class="rowtop">Title</th>
<th width="10%" class="rowtop">Description</th>
<th width="10%" class="rowtop">No_Vacancy</th>
<th width="10%" class="rowtop">Contact Email</th>
<th width="10%" class="rowtop">Edit</th>
<th width="10%" class="rowtop">Delete</th>
</tr>
</thead>
<tbody>
<?php // foreach ($posts as $post): ?>
<tr>
<td width="11%">
<?php ?>
</td>
<td width="24%">
<?php ?>
</td>
<td width="14%">
<?php ?>
</td>
<td width="14%">
<?php ?>
</td>
<td width="14%">
<?php ?>
</td>
</a>
</td>
</a>
</td>
</tr>
<?php //endforeach; ?>
</tbody>
</table>
<!-- form -->