AR destroys my param string

hey,

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("skilllist.name = :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 ++.

why?

it is not AR… it is standard GET params encoding (see php urlencode function specyfication: http://php.net/manual/en/function.urlencode.php)

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:

XXXXXXXX?skill=c%2B%2B