I have tried to write a query to do the following but failed.
I want to get the names of the 3 types of rooms and the correct rate from 1st jan to 31st jan.
so i can have:
1 > Single > 20, 21, 22
2 > double > 30, 31, 32
3 > Triple > 40, 41, 42
please help! cheers!
table: room_des
+----+---------+-----+
|RID | short | rt |
+----+---------+-----+
| 1 | Single | 1 |
+----+---------+-----+
| 2 | Double | 2 |
+----+---------+-----+
| 3 | Triple | 3 |
+----+---------+-----+
table: rates
+----+-------+-----+-------+------+-------+----+----+-------+------+-------+
| ID | rtype | day | month | year | w_rate| fri| Sat|e_month|e_day |e_year |
+----+-------+-----+-------+------+-------+----+----+-------+------+-------+
| 1 | 1 | 1 | 1 | 2005 | 20 | 21 | 22 | 1 | 31 | 2005 |
+----+-------+-----+-------+------+-------+----+----+-------+------+-------+
| 2 | 2 | 1 | 1 | 2005 | 30 | 31 | 32 | 1 | 31 | 2005 |
+----+-------+-----+-------+------+-------+----+----+-------+------+-------+
| 3 | 3 | 1 | 1 | 2005 | 40 | 41 | 42 | 1 | 31 | 2005 |
+----+-------+-----+-------+------+-------+----+----+-------+------+-------+