Esempio n. 1
0
 /**
  * create new task
  * @param  string $keyword keyword to search for
  * @return none
  */
 public function task($keyword)
 {
     parent::__construct($keyword, 2);
     $total = $this->total();
     $this->_db->query("insert into `task` (`keyword`,`total`) values ('{$keyword}',{$total})");
     // TODO 这里自动创建数据表
     parent::__destruct();
     // free memory
 }