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 - ScrollTo Effect (href to div) -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -

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