Jump to content

PHP and SQL Syntax help


01hanstu

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.