continued from http://www.yiiframew…8.html#msg13158
Not fully resolved yet…
I have investigated the difference between MySQL and SQLite on insertion and modification by using each log.
Yii log for MySQL:
Quote
Sankasya
(offkaicode
, sankasya
, password
, honbun
) VALUES (:_p0, :_p1, :_p2, :_p3)
○UPDATE Sankasya
SET id
=:_p0, offkaicode
=:_p1, sankasya
=:_p2, password
=:_p3, honbun
=:_p4, modified
=NOW() WHERE Sankasya
.id
=163
It works fine.
Yii log for SQLite:
Quote
○UPDATE 'Sankasya' SET "id"=:_p0, "offkaicode"=:_p1, "sankasya"=:_p2, "password"=:_p3, "honbun"=:_p4, "modified"=datetime('NOW','localtime') WHERE 'Sankasya'."id"=175
It does not work at insertion, the column "modified" being 0.
It is very strange that Yii generates the SQL code using the column "modified" because there is no description in the rule of the model definition as below.