phpcsvcodeigniterfind-in-set

How to use find_in_set() function in Codeigniter to find more than one values from the database field which was stores as comma seperated values


How to use find_in_set() function in Codeigniter to find more than one values from the database field which was stored as a comma seperated values


Solution

  • The MySQL function find_in_set() can search only for one string in a set of strings.

    This can help you

    $this->db->where('CONCAT(",", `columnname`, ",") REGEXP ",(val1|val2|val3),"');