ThingEngineer / PHP-MySQLi-Database-Class

Wrapper for a PHP MySQL class, which utilizes MySQLi and prepared statements.
Other
3.28k stars 1.35k forks source link

How to use `FIND_IN_SET` in WHERE ? #988

Closed MadHundred closed 2 years ago

MadHundred commented 2 years ago

How to use FIND_IN_SET in WHERE method? I tried different ways and this below method but doesn't work :

$query->where('ColumnName', $inputId, 'FIND_IN_SET');
MadHundred commented 2 years ago

I found the way of using FIND_IN_SET in WHERE , it must used as raw like below

$query->where("FIND_IN_SET ('" . $inputId . "' ,`columnName`)");