I created an Online Time Table and it's working fine and user or me can add new time-table row by using some data and my end result is like.
This is my SQL query (Please don't warn me to use MySQLi or PDO, I know about them, but this is a private application and I can write unsafe codes thought.)
$date = date("d/m/y");
$sql = "SELECT * FROM `s_timetable` WHERE `date` = '$date'";
$res = mysql_query($sql) or die(mysql_error());
while ($fetch_data = mysql_fetch_array($res)) {
echo "<tr>";
echo "<td>" .$fetch_data['batch_info']. "</td>";
echo "<td>" .$fetch_data['class_info']. "</td>";
echo "<td>" .$fetch_data['subject_info']. "</td>";
echo "<td>" .$fetch_data['teacher_info']. "</td>";
echo "</tr>";
}
?>
but after querying this to database, I got lots of results with same value, how can i show them as group.
Example:
LDC batch - 08:09 - science - Ashok B.
LDC batch - 09-10 - English - Jaky
LDC batch - 10-11 - Maths - Bella
Now how i can display these data as table, with title of LDC batch as that repeat in all and then time subject and teacher info with table body.
SELECT * FROMs_timetable` WHEREdate= '$date' GROUP BYbatch_info;