PLEASE help................
// I am getting output like
/*
* Date |NAME | Roll_no | ATTEND
========================================
01/02/14 |Musician | 1 | 1
01/02/14 |Leader | 2 | 1
01/02/14 |Singer | 3 | 0
08/02/14 |Musician | 4 | 0
08/02/14 |Leader | 5 | 1
08/02/14 |Singer | 6 | 1
*
*/
/* NEEDED sample output:
*
* Roll_no | NAME |01/02/14 |08/02/14
===============================
1 |Musician | 0 | 1
2 |Leader | 1 | 1
3 | Singer | 1 | 0
*/
here is my code --
{
<?php
include('config.php');
$sql = ("SELECT roll_no,attend,date from atten ") ;
$q1 = mysql_query($sql) or die("could not search!");
echo "<table border='1'>";
echo "<tr>
<td>roll_no </td>
<td> attendance</td>
<td> Date </td>
</tr>" ;
while ($row=mysql_fetch_array($q1)) {
echo "<tr>
<td>". $row['roll_no'] ." </td>
<td>". $row['attend'] ." </td>
<td>". $row['date'] ." </td>
</tr>";
}
echo "</table>";
?>
}