<?
include "connect.php";
$number=1;
$sql = "select * from room where room_status = '2' ";
$result=mysql_db_query($dbname,$sql);
while($r=mysql_fetch_array($result)) {
$room_id=$r[room_id];
$room="select * from room where room_id='".$room_id."'";
$r_room=mysql_db_query($dbname,$room);
$f_room=mysql_fetch_array($r_room);
$room_type=$f_room[room_type];
$check="select * from checkin where room_id = '".$room_id."'";
$r_check=mysql_db_query($dbname,$check);
$f_check=mysql_fetch_array($r_check);
$n_check=mysql_num_rows($r_check);