hermawanramadhan / CodeIgniter4-DataTables

MIT License
92 stars 38 forks source link

Getting error ReflectionException Property CodeIgniter\Database\SQLSRV\Result::$QBSelect does not exist #32

Closed sandyh90 closed 1 year ago

sandyh90 commented 1 year ago

Describe the bug Hello, I have a problem when using your library with this error message ReflectionException Property CodeIgniter\Database\SQLSRV\Result::$QBSelect does not exist And I have a question is this library can support SQL Server Engine or not?

Your code Here is my PHP code

 $employeeModel = new Employee;
 $employeeData = $employeeModel->select();
        return DataTable::of($employeeData)
            ->add('employee', function ($data) {
                return '-';
            })
            ->add('workgroup', function ($data) {
                return '-';
            })
            ->add('actions', function ($data) {
                return '<div class="d-grid gap-2 d-sm-block">
                <div class="btn btn-primary"><span class="bi bi-card-text"></span></div>
                <div class="btn btn-danger"><span class="bi bi-trash"></span></div>
            </div>';
            })
            ->hide('password')
            ->toJson();

and here is my JS code

        $('#employee-table').DataTable({
            processing: true,
            serverSide: true,
            bDestroy: true,
            ajax: {
                url: "<?= esc(url_to('panel.employee.get_employee')); ?>",
                type: 'POST',
                async: true
            },
            columns: [{
                data: 'employee',
                name: 'employee'
            }, {
                data: 'workgroup',
                name: 'workgroup'
            }, {
                data: 'actions',
                name: 'actions',
                orderable: true,
                searchable: true
            }, ]
        });

Screenshots Web capture_18-1-2023_153656

Version (please complete the following information):