From 0edfc548742f9dd63204110c904ea08de32f7196 Mon Sep 17 00:00:00 2001 From: asdasd Date: Tue, 17 Jun 2014 17:36:59 +0800 Subject: [PATCH] Delete IndexAction.class.php --- .../MongoDb/Lib/Action/IndexAction.class.php | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 Examples/MongoDb/Lib/Action/IndexAction.class.php diff --git a/Examples/MongoDb/Lib/Action/IndexAction.class.php b/Examples/MongoDb/Lib/Action/IndexAction.class.php deleted file mode 100644 index eaf5644..0000000 --- a/Examples/MongoDb/Lib/Action/IndexAction.class.php +++ /dev/null @@ -1,36 +0,0 @@ -display(); - } - - public function db(){ - //将MongoModel放入项目Lib\Model下并建一个测试的TestModel - //将驱动放入核心的Lib\Driver\Db\下 - $mongo = D('Test'); - //显示表名 - $this->assign('table_name', $mongo->getTableName()); - //清除所有数据 - $map = array(); - $map['where'] = '1=1'; - $result = $mongo->delete($map); - if($result) $this->assign('clear', 1); - //添加数据 - $data = array('title'=>'test','id'=>'1'); - $mongo->add($data); - $data['id'] = '2'; - $mongo->add($data); - $add = $mongo->select(); - $this->assign('add',$add); - - //更新id为1的记录的title字段值设为title2 - $mongo->where(array('id'=>'1'))->save(array('title'=>'title2')); - $update = $mongo->select(); - $this->assign('update',$update); - $action_code = highlight_file(__FILE__,1); - $this->assign('action_code',$action_code); - $this->display(); - } -} \ No newline at end of file