- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
$result = $db->query("SELECT w.wine_name as wine_name,(SELECT wine_type FROM wine_type WHERE wine_id_type = w.wine_type) as wine_type,
(SELECT variety FROM grape_variety WHERE variety_id = (SELECT variety_id FROM wine_variety WHERE wine_id = w.wine_id)) AS wine_variety,
w.year as wine_year, (SELECT winery_name FROM winery WHERE winery_id = w.winery_id) as winery,
(SELECT region_name FROM region WHERE region_id = (SELECT region_id FROM winery WHERE winery_id = w.winery_id)) as winery_region,
(SELECT cost FROM inventory WHERE wine_id = w.wine_id) as wine_cost,
(SELECT on_hand FROM inventory WHERE wine_id = w.wine_id) as wine_quantity
FROM wine w
WHERE w.wine_id = '$id'");
roman-kashitsyn 23.08.2011 18:16 # 0
rO_ot 23.08.2011 18:30 # +4
roman-kashitsyn 23.08.2011 18:34 # 0
denis90 23.08.2011 18:36 # −2
roman-kashitsyn 23.08.2011 21:41 # 0
Vasiliy 25.08.2011 08:08 # −1
AlexanderC 24.08.2011 01:18 # −2
nobody 24.08.2011 23:59 # 0
Vasiliy 25.08.2011 08:10 # 0
nobody 25.08.2011 17:38 # −1