タグ

ブックマーク / cakephp.seesaa.net (1)

  • MySQLの関数を利用

    'last_login' => '!-NOW()' という書き方は使えなくなって、 $conditions = array( 'FooModel.foo_important_type = NOW()' ); にしたらダイジョウブらしい。 save()の場合には、 if ($this->Post->save($this->data)) { $this->Post->updateAll( array('Post.title' => 'Now()'), array("Post.id" => $this->Post->getLastInsertID()) ); みたいにしたらNow()が使えます。これでいいんだろうか…。

    MySQLの関数を利用
    zederbuch
    zederbuch 2009/04/17
    cakephpのconditionsの中でMySQLの関数を利用する方法
  • 1