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

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -