Filtering Columns with a value thats a wildcard

Permalink
Hi All,

At the moment I'm editing some code and I'm having difficulty with a filter function. If there's any possibility of someone shedding some light it would be greatley appreciated!

The function I'm trying to use is:

$l->filter($column, $value, $comparison = ‘=’)

I can get the function to work, but the problem is that the $values in the $column start with a prefixs and have numbers after, i.e. IND-xxx, DIS-xxx, SOL-xxx.

What I really want to do is use a wildcard so it sorts for example only $values that start with 'IND'..

For example this is what I'm trying:

$ind= "IND"%
$this->bl->filter('bBookingReference',$ind,'=');


Any Ideas?

Many Thanks for reading :)

omars786
 
synlag replied on at Permalink Best Answer Reply
synlag
Hi,

doesn't

$ind= "IND%";
$this->bl->filter('bBookingReference',$ind,'LIKE');


work?

Greets
omars786 replied on at Permalink Reply
omars786
AMaaaazing!

Thanks so much! Works perfectly, didn't know that I could use 'Like' in the condition :)

Much Appreciated and have a fantastic weekend!
synlag replied on at Permalink Reply
synlag
You're welcome, mark it as best answer.

Thanks, have a nice weekend too :)