Esempio n. 1
0
 public function insertUserAction()
 {
     $user = new \stdClass();
     $user->id = 13;
     $user->name = 'starjiang\'1222';
     $user->email = '*****@*****.**';
     $user->sex = 1;
     //echo self::$userDao->insert($user);
     CDbMapper::getInstance("user")->updateByPk($user);
     CDbMapper::getInstance("user")->save($user);
     CDbMapper::getInstance("user")->deleteByPk(1);
     CDbMapper::getInstance("user")->where('id', '=', 1)->delete();
 }
Esempio n. 2
0
 protected function __construct()
 {
     parent::__construct('user', 'id');
 }