<p><span style="color: #555555; font-family: Tahoma;">SQLite Local DataBase를 이용하여 어플 만드는 Tutorial 입니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구&nbsp;관리&nbsp;반갑다 친구입니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구 조회,&nbsp;해당 친구 상세 내용, 친구 등록, 친구 수정, 친구 삭제&nbsp;에 대해서 부분적 설명후 전체 소스를 첨부하겠습니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">1. OpenDataBase&nbsp;</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">1.1. DB 생성</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">기본적으로 SQLite DB를 이용하기 때문에 DB 테이블을 생성하겠습니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">temp_db_create:function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;db&nbsp;=&nbsp;bizMOB.SQLite.openDatabase();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//SQLite와&nbsp;내부&nbsp;DB연결하는&nbsp;객체를&nbsp;db에&nbsp;저장</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//트랜잭션을&nbsp;실행</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(<span class="string">"create&nbsp;table&nbsp;if&nbsp;not&nbsp;exists&nbsp;Friends_address("</span>&nbsp;+&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="string">"&nbsp;no&nbsp;integer&nbsp;primary&nbsp;key&nbsp;autoincrement,"</span>&nbsp;+&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="string">"name&nbsp;varchar2,nickname&nbsp;,birthday&nbsp;,sex&nbsp;integer&nbsp;,facebook&nbsp;,mobile&nbsp;,memo&nbsp;)"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//Friends_address&nbsp;테이블을&nbsp;생성한다.&nbsp;</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//테이블이&nbsp;존재할경우&nbsp;작동되지&nbsp;않으며&nbsp;없을경우&nbsp;생성한다.</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//name에&nbsp;varchar2로&nbsp;타입을&nbsp;정하였지만&nbsp;없어도&nbsp;크게&nbsp;문제되지않는다.</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">}&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">DB에 넣을 정보는 친구정보의 no라는 자등증가하는 primary 값과</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">이름,별명,생일,성별,페이스북과,연락처,메모등을 구성하였다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">1.2. 데이터 넣기</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">테이블이 생성 되어 있어 사용상에는 크게 문제가 되지 않습니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">하지만 데이터가 아무것도 없기 떄문에 빠른 확이을 위하여 임시 데이터를 넣겠습니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">temp_db_insert:function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//임시&nbsp;데이터&nbsp;넣기</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;query&nbsp;=&nbsp;<span class="keyword">new</span>&nbsp;Array();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;query_header&nbsp;=<span class="string">"insert&nbsp;into&nbsp;friends_address&nbsp;(name&nbsp;,nickname&nbsp;,birthday&nbsp;,sex&nbsp;,facebook&nbsp;,mobile&nbsp;,memo)&nbsp;values"</span>;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('김태희','공주님','1990-02-25',1,'http://twitter.com/@teahee','01031315252','내&nbsp;사랑스런&nbsp;베프');"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('송혜교','풀하우스','1980-11-04',1,'http://twitter.com/@song','01079795452','현빈&nbsp;군대감');"</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('이나영','도망자','1989-05-16',1,'http://twitter.com/@na0','01058581222','인형&nbsp;나영');"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('고소영','장동건부인','1988-05-05',1,'http://twitter.com/@goso','0107979123','신혼댁');"</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('장동건','고소영남편','1982-08-15',0,'http://twitter.com/@donggun','01083254','대통령');"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('조인성','군악대','1985-05-07',0,'http://twitter.com/@insung','0103215421','군악대&nbsp;인기남');"</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('강동원','프림없는커피','1960-03-01',0,'http://twitter.com/@dongwon','0198561245','초능력자');"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('차인표','대물&nbsp;국회의원','1990-02-17',0,'http://twitter.com/@menu','0109506452','신애라&nbsp;신애라');"</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query.push(query_header&nbsp;+&nbsp;<span class="string">"('서태지','난알아요','1978-02-21',0,'http://twitter.com/@leezia','0103995454','힘내&nbsp;태지야');"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;i&nbsp;=&nbsp;0;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$.each(query,function(i)&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(query[i],[],function(){&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">쿼리문에 배열을 선언하여 여러개의 쿼리문을 push 한 후에 each 문을 이용하여 반복작업을 수행합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">1.3. 데이터 초기화</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">자신이 넣은 자료를 초기화 하기 위하여 소스입니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">SQLite에서는 truncate_table 함수를 제공하지 않습니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">delete 문을 사용해야합니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">temp_db_delete:function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//테이블값&nbsp;지우기</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;query&nbsp;=<span class="string">"delete&nbsp;from&nbsp;friends_address"</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(query);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">테이틀의 값을 지웁니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">이것으로 기본적인 테이블 생성,데이터 입력, 데이터값 삭제를 해보았습니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">만약 테이블 자체를 삭제를 하시고자 하실떄는 drop talble friends_address 를 하시면됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">2. 친구 목록 조회</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="imageblock center" style="color: #555555; font-family: Tahoma; text-align: center; clear: both;"><img src="https://t1.daumcdn.net/cfile/tistory/1831B0554E2F64970F" width="480" alt="" filename="SC20110727-100415.jpg" filemime="image/jpeg" style="border-width: 0px; cursor: pointer; max-width: 100%; height: auto;" /></div>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">조회시 이름,별명,연락처로 검색이 가능하며</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">검색 전에는 모든 데이터를 출력합니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구 추가가 가능합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(<span class="string">"select&nbsp;no,name,nickname,sex&nbsp;from&nbsp;Friends_address&nbsp;order&nbsp;by&nbsp;name"</span>,[],function(tx,rs){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;list&nbsp;=&nbsp;$(<span class="string">'#list'</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.empty();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$.each(rs.rows,function(index){&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;row&nbsp;=&nbsp;rs.rows.item(index);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;sex&nbsp;=&nbsp;row.sex;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;sex_text;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(sex&nbsp;==&nbsp;1)&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sex_text&nbsp;=<span class="string">"&lt;img&nbsp;src="</span>http:<span class="comment">//bizmob.tistory.com/script/powerEditor/images/Female.png"&nbsp;width="50"&nbsp;height="50"&gt;";</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sex_text&nbsp;=<span class="string">"&lt;img&nbsp;src="</span>http:<span class="comment">//bizmob.tistory.com/script/powerEditor/images/Man.png"&nbsp;width="50"&nbsp;height="50"&gt;";</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.append(sex_text+<span class="string">"&lt;span&gt;&lt;b&gt;"</span>+row.name&nbsp;+<span class="string">"&lt;/b&gt;&lt;/span&gt;"</span>&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+<span class="string">"&lt;span&gt;"</span>+row.nickname&nbsp;+<span class="string">"&lt;/span&gt;"</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.table_Tr_select();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//페이지&nbsp;글&nbsp;클릭시</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">eacho 문으로 반복적으로 수행하고</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">반환된 값을 rs 라는 recordset 에 답고 해당하는 rows 지칭하고 그것을 row에 담습니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">row를 이용하여 해당되는 값을 받아옵니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">이때 받아오는 값은 출력되는 컬럼명과 동일해야합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">성별에 따라 다른 사진의 경로를 넣습니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">그리고 해당 값을 append 하여 기록합니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">기록을 하면 해당 no 값을 td에 넣어 해당 값을 차후에 쓸수 있도록 합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">page.table_Tr_select는 말그대로</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">해당 Tr를 선택시 즉</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">사진 이름 별명 에 해당되는 줄을 클릭시 발생하는 함수를 지정한 것입니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">소스는 아래와 같습니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">table_Tr_select:function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//선택</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="string">'tbody&nbsp;&gt;&nbsp;tr'</span>).click(function()&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;selected&nbsp;=&nbsp;$(<span class="keyword">this</span>).children();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>(selected&nbsp;==&nbsp;<span class="string">''</span>&nbsp;||&nbsp;selected&nbsp;==&nbsp;undefined)&nbsp;<span class="keyword">return</span>;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Friend_INFO.S_NO&nbsp;=&nbsp;$(selected).attr(<span class="string">'no'</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">/*&nbsp;새로운&nbsp;웹&nbsp;페이지를&nbsp;연다&nbsp;*/</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bizMOB.Web.open(<span class="string">"sqlite/html/sqlite_info.html"</span>,&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modal&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;페이지를&nbsp;modal&nbsp;를&nbsp;열것&nbsp;인지&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;현재&nbsp;페이지를&nbsp;새로운&nbsp;웹&nbsp;페이지로&nbsp;교체&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message&nbsp;:&nbsp;Friend_INFO&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;페이지에&nbsp;전달할&nbsp;데이터</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">}&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">&nbsp;</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">tbody 안에 tr를 클릭이벤트 발생시&nbsp;</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">선택한것의 자식을 선택합니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">여기서 상속의 개념이 존재하게 됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">해당 선택한 값의 no값을 Json 형태의 S_NO 값에 저장합니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">선택된 no 값을 넘겨주어 상세 정보에서 해당 no 에 대한 값을 조회 하기 위함입니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">Friend_INFO&nbsp;에&nbsp;info&nbsp;정보에&nbsp;보내줍니다.&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><span style="color: #555555; font-family: Tahoma;">이제 검색 결과가 없을 경우 조회하는 부분을 설명하였습니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">이제 검색단어로 검색부분을 설명하겠습니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="imageblock center" style="color: #555555; font-family: Tahoma; text-align: center; clear: both;"><img src="https://t1.daumcdn.net/cfile/tistory/141A4F3D4E2F692723" width="480" alt="" filename="SC20110727-100238.jpg" filemime="image/jpeg" style="border-width: 0px; cursor: pointer; max-width: 100%; height: auto;" /></div>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">$(<span class="string">'#search'</span>).click(function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;type&nbsp;=&nbsp;$(<span class="string">'select#searchoption&nbsp;option:selected'</span>).val();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//옵션에서&nbsp;선택된&nbsp;값을&nbsp;가져온다.</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;word&nbsp;=&nbsp;$(<span class="string">'#searchword'</span>).val();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//검색단어를&nbsp;가져온다.</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(type&nbsp;==&nbsp;<span class="string">"이름"</span>)&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;=&nbsp;<span class="string">"name"</span>;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(type&nbsp;==&nbsp;<span class="string">"연락처"</span>)&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;=&nbsp;<span class="string">"mobile"</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(type&nbsp;==&nbsp;<span class="string">"별명"</span>)&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;type&nbsp;=&nbsp;<span class="string">"nickname"</span>;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//선택된&nbsp;타입에&nbsp;대한&nbsp;컬럼명으로&nbsp;변경</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;query;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(word&nbsp;==&nbsp;<span class="string">""</span>)&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query&nbsp;=&nbsp;<span class="string">"select&nbsp;no,name,nickname,sex&nbsp;from&nbsp;Friends_address"</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;word&nbsp;=&nbsp;<span class="string">"%"</span>+word+<span class="string">"%"</span>;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;query&nbsp;=&nbsp;<span class="string">"select&nbsp;no,name,nickname,sex&nbsp;from&nbsp;Friends_address&nbsp;where&nbsp;"</span>+type+<span class="string">"&nbsp;like&nbsp;?"</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//쿼리문을&nbsp;미리&nbsp;작성하는데&nbsp;검색어가&nbsp;없을&nbsp;경우와&nbsp;있을&nbsp;경우를&nbsp;나눠서&nbsp;구분한다.</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//like&nbsp;문을&nbsp;이용하여&nbsp;출력하기&nbsp;떄문에&nbsp;해당&nbsp;검색어의&nbsp;앞뒤로&nbsp;%를&nbsp;붙여준다.</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//%바&nbsp;는&nbsp;끝단어가&nbsp;바일&nbsp;경우&nbsp;이고&nbsp;바%는&nbsp;시작단어가&nbsp;바일&nbsp;경우이다.</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//%바%라면&nbsp;시작,끝&nbsp;중간에&nbsp;상관없이&nbsp;검색하는&nbsp;단어이다.</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(query);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(word);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(query,[word],function(tx,rs){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;list&nbsp;=&nbsp;$(<span class="string">'#list'</span>);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.empty();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$.each(rs.rows,function(index){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;row&nbsp;=&nbsp;rs.rows.item(index);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;sex&nbsp;=&nbsp;row.sex;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;sex_text;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">if</span>&nbsp;(sex&nbsp;==&nbsp;1)&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sex_text&nbsp;=<span class="string">"&lt;img&nbsp;src="</span>http:<span class="comment">//bizmob.tistory.com/script/powerEditor/images/Female.png"&nbsp;width="50"&nbsp;height="50"&gt;";</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">else</span>&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sex_text&nbsp;=<span class="string">"&lt;img&nbsp;src="</span>http:<span class="comment">//bizmob.tistory.com/script/powerEditor/images/Man.png"&nbsp;width="50"&nbsp;height="50"&gt;";</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list.append(sex_text+<span class="string">"&lt;span&gt;&lt;b&gt;"</span>+row.name&nbsp;+<span class="string">"&lt;/b&gt;&lt;/span&gt;"</span>&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+<span class="string">"&lt;span&gt;"</span>+row.nickname&nbsp;+<span class="string">"&lt;/span&gt;"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.table_Tr_select();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//페이지&nbsp;글&nbsp;클릭시</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">});&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">추가버튼을 클릭 할경우</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구 등록 페이지로 이동합니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">var&nbsp;add&nbsp;=&nbsp;bizMOB.Ui.createButton({&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button_text&nbsp;:&nbsp;<span class="string">"추가"</span>,&nbsp;<span class="comment">//&nbsp;버튼&nbsp;텍스트</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image_name&nbsp;:&nbsp;<span class="string">"app/android/images/toolbar/tbb_btn_add.png"</span>,&nbsp;<span class="comment">//&nbsp;버튼&nbsp;이미지&nbsp;path</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listener&nbsp;:&nbsp;function()&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;TODO&nbsp;click&nbsp;event&nbsp;처리</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">/*&nbsp;새로운&nbsp;웹&nbsp;페이지를&nbsp;연다&nbsp;*/</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bizMOB.Web.open(<span class="string">"sqlite/html/sqlite_add.html"</span>,&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modal&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;페이지를&nbsp;modal&nbsp;를&nbsp;열것&nbsp;인지&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;현재&nbsp;페이지를&nbsp;새로운&nbsp;웹&nbsp;페이지로&nbsp;교체&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message&nbsp;:&nbsp;{}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;페이지에&nbsp;전달할&nbsp;데이터</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button.push(add);&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><span style="color: #555555; font-family: Tahoma;">추가버튼은 toolbar에 구성되있습니다 .그렇기때문에 초기에 화면구성시</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">button.push에 포함을 시키시면됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">3. 친구 추가</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">&nbsp;</span></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="imageblock center" style="color: #555555; font-family: Tahoma; text-align: center; clear: both;"><img src="https://t1.daumcdn.net/cfile/tistory/154F63334E2F64EA26" width="480" alt="" filename="SC20110727-100225.jpg" filemime="image/jpeg" style="border-width: 0px; cursor: pointer; max-width: 100%; height: auto;" /></div>
<p><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구목록페이지에서 추가 버튼을 클릭하면 이동합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">기본 틀구성은 html로 구성됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">내용을 모두 작성된 후에 toolbar의 추가버튼을 선택하여 내용이 등록됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">친구 목록 페이지의 추가버튼과는 기능이 다릅니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;add&nbsp;=&nbsp;bizMOB.Ui.createButton({&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;button_text&nbsp;:&nbsp;<span class="string">"추가"</span>,&nbsp;<span class="comment">//&nbsp;버튼&nbsp;텍스트</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image_name&nbsp;:&nbsp;<span class="string">"app/android/images/toolbar/tbb_btn_add.png"</span>,&nbsp;<span class="comment">//&nbsp;버튼&nbsp;이미지&nbsp;path</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;listener&nbsp;:&nbsp;function()&nbsp;{&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;각&nbsp;input의&nbsp;내용&nbsp;갖고오기</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;name&nbsp;=&nbsp;$(<span class="string">'#name'</span>).val();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;nickname&nbsp;=&nbsp;$(<span class="string">'#nickname'</span>).val();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;birthday&nbsp;=&nbsp;$(<span class="string">'#birthday'</span>).val();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;facebook&nbsp;=&nbsp;$(<span class="string">'#facebook'</span>).val();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;mobile&nbsp;=&nbsp;$(<span class="string">'#mobile'</span>).val();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;sex&nbsp;=&nbsp;$(<span class="string">'select#sex&nbsp;option:selected'</span>).val();&lt;br&gt;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&lt;span&nbsp;style=<span class="string">"FONT-FAMILY:&nbsp;굴림;&nbsp;WHITE-SPACE:&nbsp;normal"</span>&nbsp;<span class="keyword">class</span>=<span class="string">"Apple-style-span"</span>&gt;&lt;pre&nbsp;<span class="keyword">class</span>=<span class="string">"c-sharp"</span>&nbsp;name=<span class="string">"code"</span>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//성별을&nbsp;선택한&nbsp;값을&nbsp;가져온다.&lt;/pre&gt;&lt;/span&gt;</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;memo&nbsp;=&nbsp;$(<span class="string">'#memo'</span>).val();&lt;br&gt;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&lt;span&nbsp;style=<span class="string">"FONT-FAMILY:&nbsp;굴림;&nbsp;WHITE-SPACE:&nbsp;normal"</span>&nbsp;<span class="keyword">class</span>=<span class="string">"Apple-style-span"</span>&gt;&lt;pre&nbsp;<span class="keyword">class</span>=<span class="string">"c-sharp"</span>&nbsp;name=<span class="string">"code"</span>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//이름&nbsp;값이&nbsp;없을&nbsp;경우&lt;/pre&gt;&lt;/span&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(name&nbsp;=="")&nbsp;{</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(<span class="string">"이름을&nbsp;입력해주세요"</span>);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$(<span class="string">'#name'</span>).focus();&lt;br&gt;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;</li>
      <li class="alt">&lt;span&nbsp;style=<span class="string">"FONT-FAMILY:&nbsp;굴림;&nbsp;WHITE-SPACE:&nbsp;normal"</span>&nbsp;<span class="keyword">class</span>=<span class="string">"Apple-style-span"</span>&gt;&lt;pre&nbsp;<span class="keyword">class</span>=<span class="string">"c-sharp"</span>&nbsp;name=<span class="string">"code"</span>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//해당&nbsp;위치로&nbsp;마우스&nbsp;커서&nbsp;이동&lt;/pre&gt;&lt;/span&gt;</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="keyword">return</span>&nbsp;<span class="keyword">false</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;TODO&nbsp;등록</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db.transaction(function(tx){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;query&nbsp;=&nbsp;<span class="string">"insert&nbsp;into&nbsp;friends_address&nbsp;(name&nbsp;,nickname&nbsp;,birthday&nbsp;,sex&nbsp;,facebook&nbsp;,mobile&nbsp;,memo)&nbsp;values(?,?,?,?,?,?,?)"</span>;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;binding&nbsp;=&nbsp;<span class="keyword">new</span>&nbsp;Array();&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(name);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(nickname);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(birthday);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(sex);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(facebook);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(mobile);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;binding.push(memo);&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(query);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(binding.toString());&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//사파리&nbsp;콜솔에&nbsp;쿼리와&nbsp;바인딩되는&nbsp;값을&nbsp;기록</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tx.executeSql(query,binding,function(){&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(<span class="string">"등록되었습니다."</span>);&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">/*&nbsp;새로운&nbsp;웹&nbsp;페이지를&nbsp;연다&nbsp;*/</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bizMOB.Web.open(<span class="string">"sqlite/html/sqlite_select.html"</span>,&nbsp;{&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;modal&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;페이지를&nbsp;modal&nbsp;를&nbsp;열것&nbsp;인지&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;replace&nbsp;:&nbsp;<span class="keyword">false</span>,&nbsp;<span class="comment">//&nbsp;현재&nbsp;페이지를&nbsp;새로운&nbsp;웹&nbsp;페이지로&nbsp;교체&nbsp;여부</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;message&nbsp;:&nbsp;{}&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="comment">//&nbsp;페이지에&nbsp;전달할&nbsp;데이터</span>&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},function(error){&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;alert(<span class="string">"Transaction&nbsp;error&nbsp;code:&nbsp;"</span>+&nbsp;error.code&nbsp;+<span class="string">",&nbsp;message:&nbsp;"</span>+error.message);&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},function(){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});&nbsp;&nbsp;</li>
      </ol>
   </div>
<p><span style="color: #555555; font-family: Tahoma;">값이 없을 경우는 이름이 없을 경우에만 체크하도록하였습니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">수정 기능이 있기떄문입니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">&nbsp;추가 버튼을 클릭하여 값을 입력합니다.</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">binding값을 배열을 이용하여 반복적인 값을 입력하여 쿼리에 넣고 실행합니다.</span><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">4. 친구 상세 정보</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<div class="imageblock center" style="color: #555555; font-family: Tahoma; text-align: center; clear: both;"><img src="https://t1.daumcdn.net/cfile/tistory/117094574E2F64B625" width="480" alt="" filename="SC20110727-100314.jpg" filemime="image/jpeg" style="border-width: 0px; cursor: pointer; max-width: 100%; height: auto;" /></div>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /></p>
<p style="color: #555555; font-family: Tahoma;">&nbsp;</p>
<p><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">선택한 친구 정보의 값을 출력합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">연락처 별명 생일 메모</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">성별은 사진으로 구분합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">성별이 남자일 경우 남자사진으로 표시되며</span><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">여자일 경우 여자사진으로 표시됩니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">전화 결기는 모바일 환경에서 전화걸기 바로 작동합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">SMS는 모바일환경에서 문자보내기로 이동합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><span style="color: #555555; font-family: Tahoma;">페이스 북의 경우는 알림창메세지로 주소만 표출합니다.</span><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /><br style="color: #555555; font-family: Tahoma;" /></p>
<div class="dp-highlighter" style="color: #555555; font-family: Tahoma;">
   <div class="bar">
      <div class="tools"><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">view plain</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">copy to clipboard</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">print</a><a href="https://bizmob.tistory.com/7#" style="color: #000000; text-decoration-line: none;" target="_blank">?</a></div>
      </div>
   <ol start="1" class="dp-c">
      <li class="alt">requestData:function(json){&nbsp;&nbsp;</li>
      <li class="">&nbsp;&nbsp;&nbsp;&nbsp;db&nbsp;=&nbsp;bizMOB.SQLite.openDatabase();&nbsp;&nbsp;</li>
      <li class="alt">&nbsp;&nbsp;&nbsp;&nbsp;no&nbsp;=&nbsp;json.S_NO;&nbsp;&nbsp;</li>
      <li 