addInCondition only shows up one keyword

hey,

i’ve got a list of tasks with keywords, joined in a many_many relation. works fine so far.

now i want a keyword filter. for example search for task with keyword ‘html’.

works also fine, it shows the tasks with keyword html, but not the other keywords of the task.




 $task = new Task();

        $criteria = new CDbCriteria();

        $criteria->condition = "t.blocked = 0 AND t.answered = 0 AND t.date_deadline > NOW()";

        $criteria->order = 't.id desc';

        $criteria->with = 'keywordlist';

        $criteria->together = true;

        $criteria->addInCondition('keywordlist.name', array('html'),'AND');

$tasks = $task->getAllTasks($criteria);






    public function getAllTasks($criteria) {

        return Task::model()->findAll($criteria);

    }



is there a method, which only checks IF the keyword html is in the keywordlist column and shows all the rest of the keywords as well.

NOW i got:

task-title 1

keywords: html

task-title 2

keywords: html

BUT i want:

task-title 1

keywords: html, css, javascript

task-title 2

keywords: html, html5, web 2.0




$criteria->addSearchCondition('keywordlist.name', 'html', true,'AND', 'LIKE');



brings me the same result :(