Beispiel #1
0
 function set_tag($tag_name, $map_id)
 {
     // db 연결
     $TagDB = new TagDB();
     // tag_name 저장
     //$TagDB->anti_sqlinjection();
     $TagDB->set_tag($tag_name, $map_id);
 }
Beispiel #2
0
 function set_tag($tag_name, $map_id)
 {
     $has_tag_id = $this->get_tag_id($tag_name);
     // db 연결
     $TagDB = new TagDB();
     // tag_name 저장
     $TagDB->anti_sqlinjection();
     // 태그네임이 이미 있는경우
     if ($has_tag_id != null) {
         $db_result = $TagDB->link_tag($has_tag_id, $map_id);
         $result = array('result' => $db_result);
     } else {
         $db_result = $TagDB->set_tag($tag_name, $map_id);
         $result = array('result' => $db_result);
     }
     return $result;
 }