How to send a custom COLUMN property to the server-side script?

How to send a custom COLUMN property to the server-side script?

GeMaGeMa Posts: 7Questions: 2Answers: 0
edited October 2017 in Free community support

I want to be able the specify a CUSTOM PROPERTY to columns. Like there already exists properties like "searchable" or "sortable", I want to create a custom property "exact" to tell the server-side script to use the " = " operator instead of " LIKE " for building the SQL.

Two questions:
1. how do I define (client-side) a custom property on COLUMN level ?
2. how do I define (client-side) a default value for that property on TABLE level ?

Below the already corrected (part of) ssp.class.php:

if ( $requestColumn['searchable'] == 'true' ) {
    if ( $requestColumn['exact'] == 'true' ) {
        $binding = self::bind( $bindings, $str, PDO::PARAM_STR );
        $globalSearch[] = "`".$column['db']."` = ".$binding;
    } else {
        $binding = self::bind( $bindings, '%'.$str.'%', PDO::PARAM_STR );
        $globalSearch[] = "`".$column['db']."` LIKE ".$binding;
    }
}

Thanks in advance.

MG

This discussion has been closed.