Special queries with ActiveRecords

For CAutoComplete i'd like to perform a query like:

... WHERE name LIKE 'abc%'

Is there a way to do this with ActiveRecords? It doesn’t work with find() using parameters and i also tried to use findBySql(“name LIKE ‘abc%’”), but it encodes the % character.

BTW: if this would also work with AR, i can hardly think of any queries, you couldn’t perform with the current implementation. Everything i needed SqlMap in Prado for, i can now do with AR in Yii. Awesome.  :D

How did you it was encoded? Yii doesn't do that. The SQL is passed to PDO directly.

Sorry, you're right of course, it works. Not sure, what i've missed.

Only drawback: I have to manually encode the search term to prevent sql injection etc.