示例#1
0
文件: Notes.php 项目: sandin/iMemo
 /** 
  * addCategory时需要为note和category创建链接
  * 
  * @param $category_id
  * 
  * @return 
  */
 public function makeCategoryLink($category_id)
 {
     if ($this->getId()) {
         $taglink = new Database_NotesLinkCategorys($this->_db);
         $taglink->category_id = $category_id;
         $taglink->note_id = $this->getid();
         $taglink->save();
         return $taglink->getId();
     }
 }