Here i want to display all the columns but i have getting all the columns except first one. How i can get first one ? Anyone can help me to solve this problem.
Code:
<form method='get'>
<?php
if (!isset($_GET['startrow']) or !is_numeric($_GET['startrow'])) {
//we give the value of the starting row to 0 because nothing was found in URL
$startrow = 0;
//otherwise we take the value from the URL
} else {
$startrow = (int)$_GET['startrow'];
}
$result = mysql_query("select s.s_id,s.s_name, DATE_FORMAT(s.s_date,'%d/%m/%Y'),DATE_FORMAT(s.s_emaildate,'%d/%m/%Y'),s.s_category,s.p_jawab,a.sc_category,b.staff_username from soal_jawab s, category a, staff b
where s.s_category = a.sc_id
and s.p_jawab = b.ic_num
and s.s_category = 'SC1'
LIMIT $startrow, 10;")or
die(mysql_error());
$num=mysql_fetch_array($result);
if($num>0)
{
?>
<table id="rounded-corner">
<thead>
<tr>
<th>NO.SIRI</th>
<th>TARIKH TERIMA EMAIL</th>
<th>KATEGORI</th>
<th>PANEL PENJAWAB</th>
<th>TARIKH SERAH SOALAN</th>
<th>TARIKH BALAS EMAIL</th>
<th>KEMASKINI</th>
<th>PADAM</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="12"></td>
</tr>
</tfoot>
<?php
for($i=-1;$i<$num;$i++)
{
$num = mysql_fetch_array($result);
?>
<tbody>
<tr class="odd" onclick="window.document.location='butiransoalan.php?s_id=<?php echo $num[0];?>';">
<td><?php echo $num['s_id'];?></td>
<td><?php echo $num[3];?></td>
<td><?php echo $num['sc_category'];?></td>
<td><?php echo $num['staff_username'];?></td>
<td><?php echo $num[2];?></td>
<td></td>
<td><a href="#"><img src="images/edit.png" alt="" title="" border="0" /></a></td>
<td><a href="#"><img src="images/trash.gif" alt="" title="" border="0" /></a></td>
</tr>
</tbody>
<?php } ?>
</table>
<?php } ?>
<?php
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.($startrow+10).'">Next</a>';
$prev = $startrow - 10;
//only print a "Previous" link if a "Next" was clicked
if ($prev >= 0)
echo '<a href="'.$_SERVER['PHP_SELF'].'?startrow='.$prev.'">Previous</a>';
?>
</form>
Comment