SetCounter() function in Yii?

Hi,

I’m looking for a SetCounter() function in yii.

I know of the updateCounte() function, however this is not what I’m looking for, since it increments the Counter.

I want to be able to set the counter…

THX

andreas

A “counter” is just a field in the database… the updateCounter() method is just a helper so that you don’t need to do commands like “update table set field=field+1”…

so to set a counter you just set that field to the value you need and save it… you can use save(), saveAttributes() or any other save method…