Creating common questions wiki

There are some question that repeat again and again…

The one I remember the most is why $model->save() not working :)

I hear it at the chat or forum every day…

Maybe you list here the most common question you meat here at the forum… and I can create wiki section with those questions with answers…

So from what I can remember:

  1. why $model->save() not working

  2. how to connect to database in controller

  3. how to change site/action?id=123 to site/action/id

  4. Call to a member function getAttributes() on a non-object …

  5. why ActiveForm not doing ajax validation

  6. how to use find / findByAttributes etc.

  7. how to encrement decrement counter via query builder

url rewrite

You can add more here

stick to the format ::)