-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them
Description
Description
I think its a bug as well, using the query builder, the join query is not working! It gets only the table mention inside table() i.e acl_roles_permissions, while in MySQL Manager I'm getting the result with join.
$db = \Config\Database::connect();
$res = $db->table('acl_roles_permissions')
->select('`acl_roles_permissions`.`role_id` as `permission_role_id`,`acl_roles_permissions`.`permission_id`, `permissions`.`key` as `permission_key`,`permissions.name` as `permission_name`')
->join('acl_permissions permissions', 'permissions.id = acl_roles_permissions.permission_id')
->where('acl_roles_permissions.role_id', $role_id);
if ($res->countAllResults() > 0) {
print_r($res->get()->getResultArray());
Result of above code in the library

The same query runs inside MySQL manager.

CodeIgniter 4 version
4.0.4
Context
- Windows 10
- PHP version 7.2.19
Metadata
Metadata
Assignees
Labels
bugVerified issues on the current code behavior or pull requests that will fix themVerified issues on the current code behavior or pull requests that will fix them