i hope someone can help me on this i really need someone who can help me solve this problem…its only just a matter of aligning the tables but i really having trouble doing it.
i have a table from a database and here’s its data
[CODE]
ROOM_NO // DAYS // SUBJ_CODE // SECTION_CODE // START // END
603 || M || VSUALS 11 || AR0812 || 07:30 AM || 11:30 AM
603 || MTH || GRPHCS 11 || AR0813 || 11:30 AM || 03:00 PM
603 || MTH || SOC11 || FV0631 || 03:00 PM || 04:30 PM
709 || TH || SCULPT 031|| FV0631 || 07:30 AM || 11:30 PM
709 || M ||LIFPNT 031 || FV0631 || 07:30 AM || 12:30 PM
709 || MTH ||DESIGN 321 || AR24 || 12:30 PM || 04:00 PM
709 || TH ||PRPRAC 241 || AR0541 || 04:30 PM || 07:30 PM
what i need to do is show them to a table with their corresponding START,END,ROOM_NO and DAYS…
something like this:
[CODE]
ROOM || DAY || 07:30 AM – 09:00 AM || 09:00 AM – 10:30 || and so on..
709 || M || LIFPNT 031 / FV0631 //this will continue until 12:30 PM
|| TH || SCULPT 031 / FV0631 //and the time table is fixed to 1
//1/2 interval
i tried writing a code and here it is…
[CODE]
<?
$GetResult =mysql_query(“SELECT * FROM tblSched”);
?>
<table>
<tr>
<th>Room No</th>
<th>Days</th>
<th>07:30 – 09:00 AM</th>
<th>09:00 – 10:30 AM</th>
<th>Room No</th>
</tr>
<?
while ($row = mysql_fetch_array($GetResult)) {
?>
<tr>
<td><? echo $row[‘ROOM_NO’];?></td>
///// My problem here is
//that it show 3 difference results and i
//don’t know how to not show the
//duplicates, i tried using array_unique but
//it still did not work…
<td><? echo $row[‘DAYS’];?></td>
// also with this the days are all scrambled up
// and it messes all the tables…
$row[‘SUBJ_CODE’];
$row[‘SECTION_CODE’];
$row[‘START’];
$row[‘END’];
}
?>
</table>
i think i have to make an array to solve this problem…but i dont know where to start,i hope someone can help me on this or give me an example..tnx