Here’s the situation… in the Controller class __construct
I put in an updatecounters action like so…
$cu=new CounterUser; $cu->updateCounters( array('points1'=>1) ,'id_user=105');
I end the application at this point to check the application log. the only sql update that appears in the log is this.
Executing SQL: UPDATE
but when I check the database table, it always shows the value of ‘points1’ as double the increment value.
what knowledge am I missing? Is the class constructed twice??
If i run this function in any other part of my application, it works fine… it’s only in the constructor that the sql update seems to run twice(?)
This makes me worry that I’m missing something fundamental knowledge of the constructor or Yii.
If someone could explain (or do a simple replication)… I would really appreciate it!