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 Quote Link to comment 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) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.