Ketika melakukan pencarian di datatables muncul error seperti dibawah ini

DataTables warning: table id=datatables – Exception Message:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘db_jaranguda.client_name’ in ‘where clause’ (SQL: select count(*) as aggregate from (select ‘1’ as `row_count` from `db_jaranguda` left join `lab` on `lab_id` = `lab`.`id`

Solusi

Error tersebut muncul karena anda tidak menyertakan nama tabel di nama kolom yang diambil dari relasi antar tabel, padah contoh diatas hanya client_name harusnya clients.client_name.

Leave a comment

Your email address will not be published. Required fields are marked *