01hanstu Posted January 12, 2009 Share Posted January 12, 2009 Hi hope you can help. In a nutshell i have a booking system where people logon, book a room and use the room simple. Now we have meeting rooms that are booked hourly whereas the classrooms a period based. What i want to know is how i can have something along the lines of Normally its: Select * from rooms and using the while command for the 5 periods $i = 1; while ($i < 6) { Now we need it to do both 6 periods but only for specific rooms. i.e. if the room selected is "Triage" then $i = 1; while($i < 7 { ... ___________________________________________________ i have tried the following: If ($room=='Triage') print"<td><div align=\"center\">".mysql_result($result,0,"mon$i"); print "<br /><br />". mysql_result($result,0,"monclass$i"); print "</div></td>"; HELP IS REALLY APPRECIATED Stuart Link to comment https://forums.phpfreaks.com/topic/140476-php-and-sql-syntax-help/ Share on other sites More sharing options...
ngreenwood6 Posted January 12, 2009 Share Posted January 12, 2009 A little more clarification of what you are trying to do would be helpful. you lost me after while($i < 6) Link to comment https://forums.phpfreaks.com/topic/140476-php-and-sql-syntax-help/#findComment-735264 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.