I have the following sql query which I am trying to rebuild with ActiveDataProvider but with no success.
Select * from LeadDetail
Where Date Between '2015-09-01' AND '2015-09-30' And Name = 'Admin' AND (Price IS NULL OR (Purchase_Date IS NULL OR Purchase_Date= '')))
I tried with the following query but it does not create the proper OR nested grouping.
$dataProvider = new ActiveDataProvider([
'query' => LeadDetail::find()
->andwhere(['between','Date',$start_date,$end_date])
->andwhere(['=','Name',Yii::$app->user->identity->username])
->andwhere(['is', 'Price', NULL])
->orwhere(['is', 'Purchase_Date', 'null'])
->orwhere(['=', 'Purchase_Date', ''])
How can I properly create nested OR??