Open rajeev-tx opened 10 years ago
Did you manage to solve this? I'm encountering the same issue. Any help is greatly appreciated.
From reading your issue the error says the issue originates here https://github.com/bllim/laravel4-datatables-package/blob/v1.4.1/src/Bllim/Datatables/Datatables.php#L565
However I don't see any reference to $input, so are you sure the version you listed is correct?
Ok my bad, the issue is in 1.4.4 https://github.com/bllim/laravel4-datatables-package/blob/v1.4.4/src/Bllim/Datatables/Datatables.php#L565 however this code doesn't seem to be in the master branch, can you try the master branch?
I have a similar problem only in search (Laravel 5) My Error:
QueryException in Connection.php line 614:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key) LIKE ? or LOWER(value) LIKE ? or LOWER(type) LIKE ?)) AS count_row_table' at line 1 (SQL: select count(*) as aggregate from (select '1' as row from `settings` where (LOWER(key) LIKE %b% or LOWER(value) LIKE %b% or LOWER(type) LIKE %b%)) AS count_row_table)
it looks like the LIKE %b%
should be quoted LIKE '%b%'`
Mark Vaughn Mobile: +1 (770) 533-2274
On Sun, Feb 22, 2015 at 11:35 AM, Mehrdad Nassiri notifications@github.com wrote:
I have a similar problem only in search (Laravel 5) My Error:
QueryException in Connection.php line 614: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key) LIKE ? or LOWER(value) LIKE ? or LOWER(type) LIKE ?)) AS count_row_table' at line 1 (SQL: select count(*) as aggregate from (select '1' as row from
settings
where (LOWER(key) LIKE %b% or LOWER(value) LIKE %b% or LOWER(type) LIKE %b%)) AS count_row_table)— Reply to this email directly or view it on GitHub https://github.com/bllim/laravel4-datatables-package/issues/173#issuecomment-75443787 .
I have the same issue, how do I fix this?
Can any help be provided?
I found issues with both $input
and $filter_columns
being protected
; changing them to public
fixed searching for me
Laravel 4.1 bllim/datatables 1.4.1 PHP version is : 5.3.10
This is exception i am getting,
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Cannot access protected property Bllim\Datatables\Datatables::$input","file":"\vendor\bllim\datatables\src\Bllim\Datatables\Datatables.php","line":565}}
This is js code, var table = jQuery('#announcements').dataTable({ "processing": true, "serverSide": true, "columnDefs":[ {"orderable":false,"targets":7} ], "ajax": "{{ route('list/announcements','active') }}" });
This is php code,
$announcements = Announcements::select(array('id','title'))->whereRaw("'".date('Y-m-d')."' between active_at and expires_at");
return Datatables::of($announcements)->make();