Hi there.
I'm pretty new to MYSQL.
Now i've got this query which i really can't put to work.
I have 3 tables from a hotel database.
Season (table)
N_season |
tec_file |
season_name |
start_date |
final_date |
Board (table)
N_board |
tec_file |
A_season |
A_room_season |
price |
Suplement(table)
N_suplement |
tec_file |
A_season |
A_room_season |
price |
Tec_file is the identifier for a Hotel, all tables have this column.
A_room_season is the identifier for a Room name belonging to a certain Tec_file.
I use this query to get the season in which the $start_date fits.
$start_date = "2003-02-01"; / this is inserted in the search form /
$tec_file = "28"; / this is inserted in the search form /
$sql = mysql_db_query($dbname,"SELECT N_season
FROM season
WHERE start_date <= '$start_date'
AND final_date > '$start_date'
AND tec_file = '$tec_file'");
then i do a query to get all the A_room_season(Board) and A_room_season(Suplement) in which
A_season = N_season(Season).
My question is: How can i define this all in one query ???
I hope this is not to confusing !
Thanks in advance
Nelson