|
|
|
|
select weather.day, weather.month, weather.year, time.time,
phenomen.icon_name, weather.min_temp, weather.max_temp,
weather. min_wind, weather.max_wind, direction.direction,
weather.min_pressure, weather.max_pressure,
weather.relwet from weather, time, phenomen, direction
where time.id_time=weather.id_time and
(phenomen.id_precipitation=weather.id_precipitation and phenomen.id_cloudiness=weather.id_cloudiness) and
direction.id_direction=weather.id_direction order by id limit 1
|
в таблице phenomen, содержится icon_name, кот. соответсвует определнному сочетанию id_precipitation и id_cloudiness. как выбрать icon_name в запросе?
+------------------+---------------+-----------+
| id_precipitation | id_cloudiness | icon_name |
+------------------+---------------+-----------+
| 4 | 0 | 1
| 5 | 0 | 2
| 6 | 0 | 3
| 7 | 0 | 4
| 8 | 0 | 5
| 9 | 0 | 6
| 4 | 1 | 7
| 5 | 1 | 8
| 6 | 1 | 9
| 7 | 1 | 10
| 8 | 1 | 11
| 9 | 1 | 12
| 4 | 2 | 13
| 5 | 2 | 14
| 6 | 2 | 15
| 7 | 2 | 16
| 8 | 2 | 17
| 9 | 2 | 18
| 4 | 3 | 19
| 5 | 3 | 20
| 6 | 3 | 21
| 7 | 3 | 22
| 8 | 3 | 23
| 9 | 3 | 24
+------------------+---------------+-----------+ | |
|
|
|
|
|
|
|
для: Medulla
(20.09.2007 в 15:11)
| | Зачем вы такой запрос громаднейший приводите - никто в нем разбираться не будет. Привидите значимые поля и чего вы хотите объясните лучше. А помогать партизанам очень сложно. | |
|
|
|