Yii
- 3 ответа
- 0 вопросов
2
Вклад в тег
Sheel::find()->where([
'and',
['>=', 'date_execution', $rangeData['firstDay']],
['<', 'date_execution', $rangeData['lastDay']],
]);
public function actionAddress()
{
$company =$_GET['id'];
}
///
/**
* view Company
*/
public function actionCompany()
{
$company =$_GET['company'];
public function actionAddress($company)
foreach ($addreses as $key=>$one){
$addres =$one->address;
};
$res[] = [
'id_sheel'=>$item->id_sheel,
'parent_recipies'=>$item->parent_recipies,
'id_company'=>$item->company->id_company,
'name_company' => $item->company->name_company,
'address' => $item->address,
'recipies' =>
$item->recipies->porous_recipies . " " .
$item->recipies->size_min . " " .
$item->recipies->type_recipies . " " .
$item->recipies->brand_recipies . " " .
"№ " . $item->recipies->number_recipies,
'amount_sheel' => $item->amount_sheel,
'date_execution' => $item->date_execution,
];
->onCondition('address = :name AND date_execution >= :time1 AND date_execution < :time2')
->orderBy('date_execution DESC')
->params([
':name' => $addres,
':time1' => ($firstDay = date("Y-m-d", mktime(0,0,0,$month,1,$year))),
':time2' => date("Y-m-d", mktime(0,0,0,$month+1,1,$year)),
])
->orderBy('date_execution DESC')