@Override public void onClick(View v) { switch (v.getId()){ case R.id.Joinbtn: // 회원가입 버튼 tid = id.getText().toString(); tpw = pw.getText().toString(); tpwConfirm = pwConfirm.getText().toString(); tname = name.getText().toString(); tbirth = birth.getText().toString(); tphoneNum = phoneNum.getText().toString(); pwCheck = Pattern.matches("^(?=.*\\d)(?=.*[~`!@#$%^&*()-])(?=.*[a-zA-Z]).{6,16}$", tpw); if(tid.trim().length() == 0 || tpw.trim().length() == 0 || tpwConfirm.trim().length() == 0 || tbirth.trim().length() == 0 || tname.trim().length() == 0 || tphoneNum.trim().length() == 0){ Toast.makeText(this, "빈칸 없이 모두 입력하세요!", Toast.LENGTH_SHORT).show(); Log.d("minsu", "공백 발생"); return; } } } public Cursor searchId(String id){ sql = "SELECT id FROM " + mDBopenHelper.DB_TABLE_USER + " WHERE id = " + "'" + id + "'"; // 입력한 아이디를 조건으로 테이블에서 아이디를 검색 c = mDB.rawQuery(sql, null); c.moveToNext(); return c; // 커서 리턴 }
|