php - How to select DISTINCT with Datatables 1.10.4 -
i have 2 columns named col1 , col2 in database, ,
select distinct col1 name_table
is there way datatables 1.10.4 ? haven't found answer in forums.
i use ssp class via url : http://www.datatables.net/examples/data_sources/server_side.html
i found answer. perhaps someone.
it needs change ssp class :
select sql_calc_found_rows '.implode("`, `", self::pluck($columns, 'db'));
to
select distinct '.implode("`, `", self::pluck($columns, 'db'));
so create ssp class parameter or extend ssp class function named distinct() example.
Comments
Post a Comment