¿ì¼± Áú¹®ÀÌ ±æ°í ³ÇØÇؼ µÚ·Î°¡±â ´©¸£½Ã°í½ÍÀº¸¶À½ 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´Â ½ºÆ®¸µ º¯¼ö·Î ¼±¾ð¸¸Çسõ°í ÀÌ ¾È¿¡ ¾î¶² °ªÀÌ µé¾î°£´Ù´Â ¾Æ¹«·± ¾ê±âµµ ¾ø´Âµ¥ ÀÌ°Ô µµ´ëü ¹º¼Ò¸°Áö ¸ð¸£°Ú½À´Ï´Ù ¾Æ¿ì ¤Ð.¤Ð....ÁøÂ¥
Á¦°¡ º¸±â·Î´Â Á¦°¡ ÇÏ°íÀÚÇÏ´Â°É Ã£±âÀ§ÇÑ ¼Ò½º´Â À§ÀÇ µÎ°³°¡ ÀüºÎÀÎ °Í °°Àºµ¥ Àú À§ÀÇ µÎ ¼Ò½º¿¡ Á¦°¡ ±¸ÇöÇÏ°íÀÚ ÇÏ´Â ±â´ÉÀ» ³ªÅ¸³»´Â ºÎºÐÀÌ ÀÖ±äÀÖ³ª¿ä?Á¦°¡ ¾µ´ë¾ø´Âµ¥¼ Çê¹°ÄÑ°íÀִ°ǰ¡¿ä
Á¦¹ßµµ¿ÍÁÖ¼¼¿ä