Ignited Datatables is a wrapper class/library based on the native Datatables server-side implementation by Allan Jardine found at http://datatables.net/examples/data_sources/server_side.html for CodeIgniter
have a problem when joining two or more tables with alias
$db['default']['dbprefix'] = 'tbl_';
here's my query
$this->datatables->select('user_id,role_id,email,password,first_name,last_name,position,u.fsp_unique_id,u.updated_at,u.status,f.fsp_unique_id,f.fsp_name')
->from('users AS u')
->join('fsp AS f','u.fsp_unique_id = f.fsp_unique_id');
echo $this->datatables->generate();
and the output error is this
Error Number: 1054
Unknown column 'tbl_u.fsp_unique_id' in 'on clause'
SELECT COUNT(*) AS numrows FROM (tbl_users AS u) JOIN tbl_fsp as f ON tbl_u.fsp_unique_id = f.fsp_unique_id
Hi,
have a problem when joining two or more tables with alias $db['default']['dbprefix'] = 'tbl_';
here's my query $this->datatables->select('user_id,role_id,email,password,first_name,last_name,position,u.fsp_unique_id,u.updated_at,u.status,f.fsp_unique_id,f.fsp_name') ->from('users AS u') ->join('fsp AS f','u.fsp_unique_id = f.fsp_unique_id'); echo $this->datatables->generate();
and the output error is this
Error Number: 1054 Unknown column 'tbl_u.fsp_unique_id' in 'on clause' SELECT COUNT(*) AS
numrows
FROM (tbl_users
AS u) JOINtbl_fsp
as f ONtbl_u
.fsp_unique_id
=f
.fsp_unique_id
please help how to fix this, Thank in advance.