¾ÛÅøÁî
46.¢½.168.138
46.¢½.168.129
46.¢½.168.161
46.¢½.168.136
46.¢½.168.145
46.¢½.168.162
46.¢½.168.144
46.¢½.168.140
115.¢½.135.198
46.¢½.168.139
 
°Ô½Ã¹° 223°Ç
   
Select¹®ÀÇ where
±Û¾´ÀÌ : ±èżº                   ³¯Â¥ : 2011-10-03 (¿ù) 15:47 Á¶È¸ : 4497
¿ì¼± Áú¹®ÀÌ ±æ°í ³­ÇØÇؼ­ µÚ·Î°¡±â ´©¸£½Ã°í½ÍÀº¸¶À½ 100¹ø ÀÌÇØÇÏÁö¸¸ ÀúÁ» »ì·ÁÁÖ¼¼¿ä...ÀϺ»È¸»ç¿Í¼­ Ä£±¸µµ¾ø°í °¡Á·µµ¾ø°í ÀÚ¹Ùµµ óÀ½Àε¥ È¥ÀÚÇؾߵǰí Àú Èûµé¾î¿ä...¤Ð¤Ð
 
¸ÕÀú Ã¥Àå ¾îÇÃÀ̱¸¿ä. ¸ÞÀÎÈ­¸é¿¡ ÀúÀåÇسõÀº Ã¥µéÀÌ °¢°¢ À̹ÌÁö+ÅؽºÆ®·Î ³ª¿ÍÀÖ°í Ã¥À̹ÌÁö¸¦ Ŭ¸¯Çϸé Æ˾÷âÀÌ ³ª¿Í¼­ ÀÚ¼¼ÇÏ°Ô º¸¿©Áִ°̴ϴÙ.
 
Ã¥ÀÌ 5±ÇÀÖÀ¸¸é ÃÑ5±ÇºÐÀÇ DB°¡ ÀÖ°ÚÁÒ?
±Ùµ¥ Ã¥ Çϳª¸¦ Ŭ¸¯Çϸé detailview¿¡´Â ±× ÇѱÇÀÇ Á¤º¸¸¸ º¸ÀÔ´Ï´Ù
ÀÌ°Ç select¹®ÀÇ whereÀ» ÀÌ¿ëÇؼ­ ¿øÇÏ´Â ·¹Äڵ常 »Ì¾Æ¿À´Â°ÅÁÒ
±Ùµ¥ ±× Where ·¹ÄÚµå¸í = ...
ÀÌ·±½ÄÀºµ¥ ¿ì¿Í...µµ´ëü Ŭ¸¯ÇÑ°É·Î ¾î¶»°Ô Àú°É ÆÇ´ÜÇÒÁö µµ¹«Áö ¸ð¸£°Ú´Â°Ì´Ï´Ù.
 
°á°úÀûÀ¸·Î Á¦°¡ÇÏ·Á´Â°Ç
Ã¥ ¸ñ·ÏÁß Å¬¸¯ÇÑ Ã¥ÀÇ DB¸¸ »Ì¾Æ¼­ Æ®À§ÅÍ·Î Àü¼ÛÇÏ·Á°í Çϴµ¥...
detailview(Ŭ¸¯ÇßÀ»¶§ Ŭ¸¯ÇÑ Ã¥ Á¤º¸¸¸ ³ªÅ¸³ª´Â°Å)°¡ Á¦°¡ ÇÏ°íÀÚÇϴ å ÇѱÇÀÇ Á¤º¸¸¸À» »Ì¾Æ³»´Â ±â´ÉÀ» ¼öÇàÇÏ°íÀֱ⶧¹®¿¡ ÀÌ°É ÂüÁ¶Çϱâ·Î Çß½À´Ï´Ù. ±Ùµ¥...»½¾ÈÄ¡°í ÀÌ ÂªÀº ºÎºÐ¸¸ 14½Ã°£ ³Ñ°ÔºÃ´Âµ¥ Á¤¸» ¸ð¸£°Ú¾î¿ä ¤Ð¤Ð
 
±×·¡¼­ Àǽɰ¡´Â°Å ÇѺκР¿Ã·Áº¾´Ï´Ù ºÎŹµå¸±°Ô¿ä ¤Ð¤Ð
 
public String Detail_RecordNo=null;
 
public void Show_Dialog_BookDetail(Context context, String BookNo){   
         String strBookName = null;
         Detail_RecordNo = BookNo;
         final Dialog dialogBookDetail = new Dialog( context );
         dialogBookDetail.setContentView( R.layout.book_detailveiw );
         ImageView ImageView = (ImageView) dialogBookDetail.findViewById(R.id.ImageView01_bookdetail);
         TextView lblList = (TextView) dialogBookDetail.findViewById(R.id.TextView01_bookdetail);
         TextView lblList_No = (TextView) dialogBookDetail.findViewById(R.id.TextView05_bookdetail);
         TextView lblList_Note = (TextView) dialogBookDetail.findViewById(R.id.TextView02_bookdetail);
         Button twitter = (Button) findViewById(R.id.twbtn);
         TextView lblList_Category = (TextView) dialogBookDetail.findViewById(R.id.TextView06_bookdetail);
         EditText_Note = (EditText) dialogBookDetail.findViewById(R.id.EditText01_bookdetail);
         TextView lblList_InsertTime = (TextView) dialogBookDetail.findViewById(R.id.TextView03_bookdetail);
         CheckBox checkBox01_bookdetail = (CheckBox) dialogBookDetail.findViewById(R.id.checkBox01_bookdetail);
         CheckBox checkBox02_bookdetail = (CheckBox) dialogBookDetail.findViewById(R.id.checkBox02_bookdetail);
         
strBookName = Book_Once_Detail_View(this,"No",BookNo,ImageView,lblList,
           lblList_No,lblList_Note,twitter,EditText_Note,lblList_InsertTime,
           checkBox01_bookdetail,checkBox02_bookdetail,lblList_Category);
         dialogBookDetail.setTitle(getCutUTFString(strBookName,15,"..."));
         
         checkBox01_bookdetail.setOnCheckedChangeListener(new OnCheckedChangeListener(){
          @Override
          public void onCheckedChanged(CompoundButton buttonView, //ÜÁêócheck
            boolean isChecked) {
           if(isChecked){
            Database_Activity_BasicSQL.Update_Info(Database_Activity_Main_Display_02.this,Detail_RecordNo,
              "ReadInfo","1");
           }else{
            Database_Activity_BasicSQL.Update_Info(Database_Activity_Main_Display_02.this,Detail_RecordNo,
              "ReadInfo","0");
           }
          }
         });
¸ÕÀú detail_recordNo¸¦ º¸½Ã¸é ½ºÆ®¸µÀ¸·Î ¼±¾ðÇØÁá°í ¾È¿¡ ¹ºÁö ¸ð¸¦ BookNo¶ó´Â ½ºÆ®¸µÇü½ÄÀÇ º¯¼ö¸¦ Áý¾î³Ö¾îÁá½À´Ï´Ù. Db¿¡ No¶ó´Â Çʵå´ÂÀ־ BookNo¶ó´Â Çʵå´Â¾øÀ¸´Ï±î ÀÏ´Ü DBÀÇ Çʵ带 ÂüÁ¶ÇÒ À̸§ÀÎ °Í °°Áö´Â ¾ÊÀºµ¥¿ä ÀÏ´Ü ¼ö»óÇÕ´Ï´Ù.
ÀÌÂʺκмҽº´Â µðÅ×ÀϺ信¼­ üũ¹Ú½º°¡ ÀÖ°í üũÇϸé DB¿¡ 1µé¾î°¡°í üũ¾ÈµÇ¸é 0ÀÌ µé¾î°¡´Â ¼Ò½ºÀÔ´Ï´Ù.
±× ¸¹Àº ReadInfoÇʵåÁß¿¡¼­ Ŭ¸¯Çؼ­ µðÅ×ÀϺä·Î º¸°íÀִ åÀÇ ReadInfo ·¹Äڵ忡¸¸ 1 ¶Ç´Â 0ÀÌ µé¾î°¡´Â°ÅÁÒ. Á¦°¡ ÇÏ·Á°íÇϴ°Ͱú È®½ÇÈ÷ ¿¬°üÀÌ À־ÀÔ´Ï´Ù. ¿©±â¼­ Detail_RecordNo°¡ Á» ¸¹ÀÌ ¼ö»óÇϳ׿ä. Àú°Ô ¹» ÀǹÌÇϴ°ɱî¿ä String Detail_RecordNo = String BookNo
Detail_RecordNo ¿¡´ÂStringÇü½ÄÀÇ BookNo¶ó´Â º¯¼ö¸¸ µé¾î°¡ÀÖÀ»»Ó BookNo¿¡ ¾î¶²°ªµµ µé¾î°¡ÀÖÁö ¾Ê½À´Ï´Ù. Âü ÀÌÇØ°¡ ¾ÈµÇ³×¿ä ...
 
µÎ¹ø°·Î ÆĶû»öÀÌ µé¾î°£ºÎºÐÀÖÁÒ? ±× ÆĶõ»ö À̸§À¸·ÎµÈ ¸Þ¼Òµå¸¦ ¹Ø¿¡ Àû¾îº¸°Ú½À´Ï´Ù
 
 
public String Book_Once_Detail_View(Context context, String Selection,
          String selectionArgsStr,
          ImageView ImageView,
          TextView lblList,
          TextView lblList_No,
          TextView lblList_Note,
          Button twitter,
          EditText EditText_Note,
          TextView lblList_InsertTime,
          CheckBox checkBox01_bookdetail,
          CheckBox checkBox02_bookdetail,
          TextView lblList_Category){
         String[] cols = {"No","BookName","ImagePath","Price","ISBN","Writer","AmazonPageURL","Note","InsertDateTime","ReadInfo","KeepInfo","Category"};  
         String selection = "No = ?";  
         //String selection = Selection + " = ?";  
         String[] selectionArgs = {selectionArgsStr};   
         String groupBy = null;  
         String having = null;  
         String orderBy = null;  
         Database_Class_MakeDatabase dbHelper = new Database_Class_MakeDatabase(context);  
         SQLiteDatabase db=dbHelper.getReadableDatabase(); 
         StringBuilder text = new StringBuilder();
         String strImagePath = null;
         String Book_Name = null;
         String Book_Note = null;
         //long InsertTime = 0;
         String InsertTime = null;
         String Category = null;
         int intChkInfo_01 = 0;
         int intChkInfo_02 = 0;
         try{  
          Cursor cursor = db.query("T_MyBookShelf", cols, selection, selectionArgs, groupBy, having, orderBy); 
 
À̺κÐÀÔ´Ï´Ù.
DB¿¡¼­ ¿øÇÏ´Â ÇʵåÀÇ ¿øÇÏ´Â ·¹Äڵ常 Ãâ·ÂÇÑ´Ù
select¹®ÀÇ whereÀÌÁÒ.
 
¿©±â¼­ º¸¸é
SELECT cols FROM T_MyBookShelf WHERE No = selectionArgs
Àä. Á¦°¡ ¿øÇÏ´Â°Ç ±×°ÅÁÒ °á±¹ whereÀ» ¾î¶»°Ô ³»°¡ Ŭ¸¯ÇÑ Ã¥ÀÇ Á¤º¸¸¸ ¹Þ´À³Ä
¿©±â¼± stringÀÇ selectionargs¸¦ ³Ö¾ú½À´Ï´Ù.±Ùµ¥ ÄÜ Ä¢¼î
¾Æ´Ï selectionargs´Â ½ºÆ®¸µ º¯¼ö·Î ¼±¾ð¸¸Çسõ°í ÀÌ ¾È¿¡ ¾î¶² °ªÀÌ µé¾î°£´Ù´Â ¾Æ¹«·± ¾ê±âµµ ¾ø´Âµ¥ ÀÌ°Ô µµ´ëü ¹º¼Ò¸°Áö ¸ð¸£°Ú½À´Ï´Ù ¾Æ¿ì ¤Ð.¤Ð....ÁøÂ¥
 
Á¦°¡ º¸±â·Î´Â Á¦°¡ ÇÏ°íÀÚÇÏ´Â°É Ã£±âÀ§ÇÑ ¼Ò½º´Â À§ÀÇ µÎ°³°¡ ÀüºÎÀÎ °Í °°Àºµ¥ Àú À§ÀÇ µÎ ¼Ò½º¿¡ Á¦°¡ ±¸ÇöÇÏ°íÀÚ ÇÏ´Â ±â´ÉÀ» ³ªÅ¸³»´Â ºÎºÐÀÌ ÀÖ±äÀÖ³ª¿ä?Á¦°¡ ¾µ´ë¾ø´Âµ¥¼­ Çê¹°ÄÑ°íÀִ°ǰ¡¿ä
 
Á¦¹ßµµ¿ÍÁÖ¼¼¿ä
 
* ±ÛÀ» µî·ÏÇϽǶ§ ²À ÇÊ¿äÇÑ °æ¿ì°¡ ¾Æ´Ï¸é °³ÀÎÁ¤º¸¸¦ ³²±âÁö ¸¶¼¼¿ä ^^ (¿¬¶ôó,À̸ÞÀÏÁÖ¼Ò,Áֹεî·Ï¹øÈ£ µî)




±èżº ´ÔÀÇ Q&A ÃÖ½Å±Û [´õº¸±â]


 
±Ç´ë°Ç 2011-10-05 (¼ö) 15:41
À½.. żº´Ô ¿À·£¸¸À̽ʴϴÙ^^ ÀÏ´Ü ¸ÕÀú ÀϺ»°è ȸ»ç¿¡ Ãë¾÷ÇϽŰŠÃßÄ«µå¸±²²¿ä^^
À§¿¡ ¼Ò½º ÆľÇÇÏ°í ´äº¯ ¾Æ·¡ Àû¾îµå¸±²²¿ä ¤¾¤¾
 
±Ç´ë°Ç 2011-10-05 (¼ö) 15:46
selectionArgs <<< À̺κÐÀº query¸¦ Àü¼ÛÇÒ¶§  " No = ? " À̺κÐÇÏ°í º¸½Ã¸éµÉÅÙµ¥¿ä..
Cursor cursor = db.query("T_MyBookShelf", cols, selection, selectionArgs, groupBy, having, orderBy); 
ÀÌÂʺκп¡¼­ selection º¯¼öÀÇ °ª¿¡  ? << ÀÌ°ÍÀÇ °¹¼ö¿Í selectionArgs[] ¹è¿­ÀÇ °ª°ú °¹¼ö°¡ »óµ¿ÇؾßÇÏÁö¿ä.. No=? ´Ï±ñ °á±¹ selectionArgs ¿¡ ÇÑ°³ÀÇ°ª Áï {"¾î¼°íÀú¼°í"} ÀÌ°Å Çϳª µé¾î°¡°ÚÁÒ..

Áï.. strBookName = Book_Once_Detail_View(this,"No",BookNo,ImageView,lblList,
          lblList_No,lblList_Note,twitter,EditText_Note,lblList_InsertTime,
          checkBox01_bookdetail,checkBox02_bookdetail,lblList_Category);
ÀÌÂÊ ºÎºÐ¿¡ º¸½Ã¸é BookNo << À̳ðÀÌ È£ÃâµÇ´Â ºÎºÐÀ̰ڳ׿ä.
 
±Ç´ë°Ç 2011-10-05 (¼ö) 15:56
±Ùµ¥ À̹æ¹ýÀº... °á±¹ º¸¸é... SQLite Äõ¸®¸¦ 2¹øÇÑ´Ù´Â ¶æÀε¥.... óÀ½ Ã¥Á¤º¸¸¦ ºÒ·¯¿Ã¶§ Äõ¸® Çѹø..
±×¸®°í ¶Ç Ŭ¸¯ÇßÀ»¶§ Ã¥Á¤º¸¸¦ º¸³»Áִ°Š¶Ç Çѹø... ºñÈ¿À²ÀûÀÔ´Ï´Ù..
óÀ½ Ã¥Á¤º¸¸¦ °¡Á®¿Ã¶§ ¹öÆÛ¿¡ ´ã¾ÆÁÖ¼¼¿ä^^ ´ÙÂ÷¿ø¹è¿­·Î °¡Áö°í ÀÖ´Ù°¡ Ŭ¸¯½Ã ÇØ´ç Á¤º¸¸¦ ³Ñ°ÜÁÖ½Ã¸é ´õ È¿À²ÀûÀ¸·Î ó¸®ÇϽǼö ÀÖÀ»µí ½Í½À´Ï´Ù^^ ÀÌ»ó Á¦ ¼Ò°ßÀÌ¿´½À´Ï´ç.
     
     
 
±èżº 2011-10-05 (¼ö) 16:37
³× ÇÏ´Ù°¡ ÇÏ´Ù°¡ ÀúºÎºÐÀÌ ÀÌÇØ°¡¾ÈµÇ¼­ °í¹ÎÇÏ´Ù°¡ »ý°¢Çغ¸´Ï±î Àú°Å ¾Ë¾ÆºÃÀÚ Db¸¦ µÎ¹ø È£ÃâÇϴ°Ŷó ¼Ò½º°¡¾öû ºñÈ¿À²ÀûÀÌ°í ¾µ¸ð¾ø¾îÁú °Í °°¾Æ¼­ ¾Æ¿¹ Àú ¸Þ¼Òµå¿¡¼­ ³ª¿Â °á°ú°ª¸¸ intentÇؼ­ ÂüÁ¶Çؼ­ ÇØ°áÇß½À´Ï´Ù. ¿À´Ã ÇÁ·ÎÁ§Æ® ¿ÏÀüÈ÷³¡³Â¾î¿ä °¨»çÇÕ´Ï´Ù ¤¾¤¾
   

°Ô½Ã¹° 223°Ç
¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ³¯Â¥ Á¶È¸
123  ÇÑ°¡Áö ´õ Áú¹® ÇÏ·Á ÇÕ´Ï´Ù! ¹Ú°¡¶÷ 11-21 3946
122  ÀÌŬ¸³½º µðÄÚµù ÇÏ´Â ¹ý ¾Ë·ÁÁÖ´Â °÷ ¾Æ½Ã´Â ºÐ °è½Å°¡¿ä? ¹Ú°¡¶÷ 11-21 4062
121  ¾Èµå·ÎÀ̵å¿Í C# ¼ÒÄÏÅë½ÅÀä +2 ÃÖ¼¼³ª 11-21 4988
120  ¾Èµå·ÎÀ̵å üÆÃÇÁ·Î±×·¥ ¸¸µå´Âµ¥¿ä.. +4 ¹Ú°¡¶÷ 11-17 4259
119  °¶·°½ÃS2 È÷µç¸Þ´º ÄÁÆ®·Ñ.. °­¼º¾È 11-07 5612
118  ADB ¸í·É¾î¿¡ °ü·ÃÇÑ Áú¹® ÀÔ´Ï´Ù. +1 ÀÌÁ¤Çö 11-03 4429
117  ADB devices ¿¡¼­ ³ª¿À´Â setÀÇ id º¯°æ ¹æ¹ýÀÌ ÀÖ³ª¿ä? ÀÌÁ¤Çö 11-03 6575
116  ¾Èµå·ÎÀ̵å¿Í Çϵå¿þ¾î±â±â Åë½Å¹æ¹ý ¹®Àǵå·Á¿ä +4 °æ 10-25 6206
115  surfaceView ·Î °ÔÀÓ·çÇÁ ±¸ÇöÇϱâ (fps¹®Á¦) +1 À̼º±Ô 10-23 5359
114  ¾Èµå·ÎÀÌµå ¾Û °³¹ß¿¡ °ü½ÉÀÌ ÀÖ´Â ¿ÏÀü Ãʺ¸ÀÔ´Ï´Ù. +8 ±è»óÈ£ 10-03 5162
113  Select¹®ÀÇ where +4 ±èżº 10-03 4498
112  XoomÀ̳ª °¶·°½Ã ÅÇ 10.1¿¡¼­ MediaRecorder »ç¿ë½Ã ¹®Á¦ ³ë°æ¼ö 09-15 4133
111  µ¿¿µ»ó¿¡ ¾Æ·¡ »óÅÂâ ¾È¶ß°Ô ÇÒ¼öÀÖ³ª¿ä?(Á¤Áö, ¾ÕÀ¸·Î,µÚ·Î, ÀϽÃÁ¤Áö ÇöÀç Àç»ý½Ã°£µî) +3 ±èµ¿±Ô 09-15 4485
110  °¶·°½Ã2 Ä«¸Þ¶ó¸ðµå ¹®Á¦ +1 ³²À̼® 09-12 3557
109  ¾Èµå·ÎÀÌµå ±×¸®µåºä ¼Ò½º Çؼ®Á» µµ¿ÍÁÖ¼¼¿ä ¤Ð¤Ð(¼öÁ¤) +1 ±èżº 09-10 6987
108     ¾Èµå·ÎÀÌµå ±×¸®µåºä ¼Ò½º Çؼ®Á» µµ¿ÍÁÖ¼¼¿ä ¤Ð¤Ð(¼öÁ¤) +1 ±èº´ÁÖ 09-26 6527
107  mmssms.db°ü·Ã¹®ÀÇÀÔ´Ï´Ù! +2 Á¤Çõ 09-09 4459
106  ¿î¼¼API´Â ¾ø³ª¿ä? +3 Çã¹®Çà 09-08 8502
105  Ãʺ¸ÀÚÀÔ´Ï´Ù. ¿¹¹Ä·¹ÀÌÅÍ ¸»Àä +4 Á¤ÀçÇå 08-31 2877
104  ÀÌÁ÷À» ÇÏ·Á°í ÇÕ´Ï´Ù. +6 ¹ÚÂù¿ì 08-27 4345
 1  2  3  4  5  6  7  8  9  10  11  12  
 
 
 
Copyright ¨Ï wwwold.androidstudy.co.kr. All rights reserved.