AR destroys my param string


i need an addcondition if a special GET param is set.

if (Yii::app()->getRequest()->getQuery('skill')) {

            $criteria->with = 'skilllist';

            $criteria->together = true;

            $criteria->addCondition(" = :skill", "AND");

            $criteria->params = array(":skill" => Yii::app()->getRequest()->getQuery('skill'));


if i test this with the get parameter ‘c++’ my trace in the logg file shows me:

Bound with :skill='c  '

it seems AR deletes those two ++.


it is not AR… it is standard GET params encoding (see php urlencode function specyfication:

you can code spaces in query string as %20 or by +. if you want to pass "+" character, use %2B, so you should call your page like this: