update ORM so it can use array for select

This commit is contained in:
Ibnu Maksum 2024-05-14 08:43:26 +07:00
parent cf8e23ae88
commit 238fc03d03
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5
2 changed files with 2713 additions and 2515 deletions

View File

@ -74,7 +74,7 @@ class User
list($cost, $rem) = explode(":", $v);
// :0 installment is done
if ($rem != 0) {
User::setAttribute($k, "$cost:".($rem - 1), $id);
User::setAttribute($k, "$cost:" . ($rem - 1), $id);
}
}
}
@ -177,21 +177,13 @@ class User
}
$d = ORM::for_table('tbl_user_recharges')
->select('tbl_user_recharges.id', 'id')
->select('customer_id')
->select('username')
->select('plan_id')
->select('namebp')
->select('recharged_on')
->select('recharged_time')
->select('expiration')
->select('time')
->select('status')
->select('method')
->select('plan_type')
->select('tbl_user_recharges.routers', 'routers')
->select('tbl_user_recharges.type', 'type')
->select('admin_id')
->select('prepaid')
->selects([
'customer_id', 'username', 'plan_id', 'namebp', 'recharged_on', 'recharged_time', 'expiration', 'time',
'status', 'method', 'plan_type',
['tbl_user_recharges.routers', 'routers'],
['tbl_user_recharges.type', 'type'],
'admin_id', 'prepaid'
])
->where('customer_id', $id)
->join('tbl_plans', array('tbl_plans.id', '=', 'tbl_user_recharges.plan_id'))
->find_many();

File diff suppressed because it is too large Load Diff