This tutorial shows you how to write not like query in codeigniter. This method is identical to like(), except that it generates NOT LIKE statements.
Let’s create a not_like method in codeigniter
$this->db->not_like('title', 'php');
// WHERE `title` NOT LIKE '%php% ESCAPE '!'