Ejemplo n.º 1
0
 function get_tag_name($tag_id)
 {
     // db 연결
     $db = new TagDB();
     // tag_name 저장
     $db_result = $db->get_tag_name($tag_id);
     return $db_result;
 }
Ejemplo n.º 2
0
 function get_tag($map_id)
 {
     // db 연결
     $db = new TagDB();
     // tag_name 저장
     $db_result = $db->get_tag($map_id);
     // 불러온 태그 이름들을 JSON 형태로 저장
     $count = 1;
     $tag_result = "{";
     while (!empty($db_result)) {
         $tag = array_pop($db_result);
         $tag_result .= "\"" . $count++ . "\" : \"" . $tag['tag_name'] . "\"";
         if (!empty($db_result)) {
             $tag_result .= ", ";
         }
     }
     $tag_result .= "}";
     return $tag_result;
 }