bSearchable behavior intended? (server side data source)
bSearchable behavior intended? (server side data source)
knechtobottic
Posts: 1Questions: 0Answers: 0
Hello there,
i try to exclude a column from the global search filter by applying the "bSortable: false" attribute to it. The data field is correctly sent to the server side script, but it's ignored for the global search.
[code]$sWhere = "";
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (";
for ( $i=0 ; $i
i try to exclude a column from the global search filter by applying the "bSortable: false" attribute to it. The data field is correctly sent to the server side script, but it's ignored for the global search.
[code]$sWhere = "";
if ( isset($_GET['sSearch']) && $_GET['sSearch'] != "" )
{
$sWhere = "WHERE (";
for ( $i=0 ; $i
This discussion has been closed.
Replies
Allan
Guess the datatables example site (http://datatables.net/examples/data_sources/server_side.html) needs to be updated :D
BTW: I noticed some more bugs, like the whitespace in $aColumns not working as inteded.
Whitespace: good point - I've never used whitespace in my SQL column names myself, so I guess I just didn't take account of that when creating the script. As part of the upgrade, the PHP script needs a big upgrade (use PDO rather than mysql_*) so I'll look at that as well.
Allan
[code] /* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array( 'engine', 'browser', 'platform', 'version', 'grade' );[/code]
Anyways ... thanks for your help and keep up the good work!