public function save() { $db = new WorldsModel(); $db->create(); if ($db->where($map)->save($data)) { $this->gSuccess("发表成功!", "__APP__/WapAdmin/"); } else { $this->gError("呃,服务器开小差了~~~稍后再试", "__APP__/Worlds/ediWorlds?id=" . $_POST['id']); } //$db->getLastSql() }
public function ediWorlds() { $map['id'] = $_SESSION['w_id']; $db = new WorldsModel(); $db->create(); if ($db->where($map)->save($data)) { $this->redirect("Index/index"); } else { $this->assign('jumpUrl', '__App__/Index'); $this->error('发表微博失败,请重试一次'); } //$db->getLastSql() }