Exemplo n.º 1
0
 /**
  * Добавление тега к топику
  *
  * @param ModuleTopic_EntityTopicTag $oTopicTag Объект тега топика
  * @return int
  */
 public function AddTopicTag(ModuleTopic_EntityTopicTag $oTopicTag)
 {
     $sql = "INSERT INTO " . Config::Get('db.table.topic_tag') . "\n\t\t\t(topic_id,\n\t\t\tuser_id,\n\t\t\tblog_id,\n\t\t\ttopic_tag_text\t\t\n\t\t\t)\n\t\t\tVALUES(?d,  ?d,  ?d,\t?)\n\t\t";
     if ($iId = $this->oDb->query($sql, $oTopicTag->getTopicId(), $oTopicTag->getUserId(), $oTopicTag->getBlogId(), $oTopicTag->getText())) {
         return $iId;
     }
     return false;
 }
Exemplo n.º 2
0
 /**
  * Добавление тега к топику
  *
  * @param ModuleTopic_EntityTopicTag $oTopicTag    Объект тега топика
  *
  * @return int
  */
 public function AddTopicTag(ModuleTopic_EntityTopicTag $oTopicTag)
 {
     $sql = "INSERT INTO ?_topic_tag\n\t\t\t(topic_id,\n\t\t\tuser_id,\n\t\t\tblog_id,\n\t\t\ttopic_tag_text\n\t\t\t)\n\t\t\tVALUES(?d, ?d, ?d, ?)\n\t\t";
     $nId = $this->oDb->query($sql, $oTopicTag->getTopicId(), $oTopicTag->getUserId(), $oTopicTag->getBlogId(), $oTopicTag->getText());
     return $nId ? $nId : false;
 }