[SOLVED] updateByPk updates all rows?

SOLUTION: Figured it out while writing this post :) It appears that the ‘;’ in the expression cuts the query short. It makes sense that it would, I’m just surprised that I never encountered this earlier. Must pertain to a certain version of MySQL?

change 'NOW();'to ‘NOW()’

seems to have a slight issue with updating a date column…

here is my code that is just running in route site/test (to try to minimize other possibilities)


  public function actionTest()

  {

    $now = new CDbExpression('NOW();');

    Lead::model()->updateByPk(57, array('dateModified'=>$now));

  }

After this code runs, every lead table in the database has the same dateModified (NOW();). Any ideas?