- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
$parent = (new \yii\db\Query())
->select(['parent','parent_1','parent_2'])
->from('user')
->where(['id' => "$user_id",])
->all();
$sum_for_parent = (new \yii\db\Query())
->select(['first_parent'])
->from('referal_control')
->all();
$sum_for_parent = $sum_for_parent[0]['first_parent'];
$sum_for_parent_1 = (new \yii\db\Query())
->select(['second_parent'])
->from('referal_control')
->all();
$sum_for_parent_1 = $sum_for_parent_1[0]['second_parent'];
$sum_for_parent_2 = (new \yii\db\Query())
->select(['third_parent'])
->from('referal_control')
->all();
$sum_for_parent_2 = $sum_for_parent_2[0]['third_parent'];
Комментарии (5) RSS
Добавить комментарий