I have a table ipd_charges with columns
table - ipd_charges
id doctor room_category charges_cash charges_cashless
1 1 1 200 300
2 1 2 300 400
table - patient_admission
id patient_name tpa_name(if not null, equivalent to charges_cashless)
1 1 Null
2 2 1
table daily_ward_entry
id patient_name room_name doctor_name charges ( from ipd charges)
1 1 1 1 200
2 2 2 1 400
I am trying to use this query which is failing:
$model = \app\models\IpdCharges::find()
->where(['doctor'=>$id])
->andwhere(['room_category'=>$this->room_name])->one();
Thanks. Please tell me if any more info is needed.
A help will be greatly appreciated.
Please check below code :
$ipdCharges = new IpdCharges();
$ipdCharges->findOne(['doctor' => $id, 'room_category' => $this->room_name]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With