+ -
当前位置:首页 → 问答吧 → 使用create()创建数据后无法更改

使用create()创建数据后无法更改

时间:2011-04-24

来源:互联网

$User = M("User");

$User->create();


$User->addtime =date("Y-m-d");


$User->add();

使用create()创建数据后,再使用

$User->addtime =date("Y-m-d");

更新数据,结果只有addtime 的字段被添加,其他都是空,这是什么原因呢

作者: yuzhanwei   发布时间: 2011-04-24

$result=$User->create();
$result['addtime']=date....;
$User->add($result);

作者: ck52110u   发布时间: 2011-04-24