$query = "SELECT food.Date, food.Food, food.Price, food_menue.number, food_menue.Summ
FROM food full join food_menue ON food.Date = food_menue.Date AND food.Food = food_menue.Food WHERE food.Date BETWEEN DATE('" . $dt_from . "') AND ('" . $dt_to . "') AND (food_menue.User_id IS NULL or food_menue.User_id = '$user_id') order by food.Date";
выдает ошибку Unknown column 'food.Date' in 'field list'
если так написано (ниже)
$query = "SELECT food.Date, food.Food, food.Price, food_menue.number, food_menue.Summ
FROM food LEFT JOIN food_menue ON food.Date=food_menue.Date AND food.Food=food_menue.Food
WHERE food.Date BETWEEN DATE('" . $dt_from . "') AND ('" . $dt_to . "')
AND (food_menue.User_id IS NULL or food_menue.User_id = '$user_id') order by food.Date";
то все нормально - но мне нада полное соединение ..
|