?? dbuser.java
字號(hào):
package mybbs;
import java.sql.*;
public class DBUser
{
private String userid;
String username,password,nickname,sex,birthday,birthmonth,birthyear,e_mail,weblog,qq,skype,mobile,
signature,usergrade,reg_time,last_ip,reg_ip,last_time,info,face;
int userscore,userpower,totalpost;
public void DBUser(){
}
public void setUserid(String userid)
{
this.userid=userid;
}
public String getNickname(){
try{
DBConn conn=new DBConn();
String sql="SELECT * FROM bbsuser WHERE id="+userid;
ResultSet rs=conn.query(sql);
rs.next();
username=rs.getString("username");
password=rs.getString("password");
nickname=rs.getString("nickname");
sex=rs.getString("sex");
birthday=rs.getString("birthday");
birthmonth=rs.getString("birthmonth");
birthyear=rs.getString("birthyear");
e_mail=rs.getString("email");
qq=rs.getString("qq");
skype=rs.getString("skype");
mobile=rs.getString("mobile");
signature=rs.getString("signature");
usergrade=rs.getString("usergrade");
reg_time=rs.getString("reg_time");
last_ip=rs.getString("last_ip");
reg_ip=rs.getString("reg_ip");
last_time=rs.getString("last_time");
info=rs.getString("info");
weblog=rs.getString("weblog");
userscore=rs.getInt("userscore");
userpower=rs.getInt("userpower");
totalpost=rs.getInt("totalpost");
face=rs.getString("face");
rs.close();
}
catch(Exception e){}
return nickname;
}
public String getUsername()
{
return username;
}
public String getPassword()
{
return password;
}
/*public String getNickname()
{
return nickname;
}*/
public String getEmail()
{
return e_mail;
}
public String getQq()
{
return qq;
}
public String getSkype()
{
return skype;
}
public String getRegtime()
{
return reg_time.substring(0,10);
}
public String getLasttime()
{
return last_time.substring(0,10);
}
public String getSignature()
{
return signature;
}
public String getUsergrade()
{
return usergrade;
}
public String getSex()
{
return sex;
}
public String getInfo()
{
return info;
}
public String getMobile()
{
return mobile;
}
public String getBirthday()
{
return birthday;
}
public String getBirthyear()
{
return birthyear;
}
public String getBirthmonth()
{
return birthmonth;
}
public int getUserscore()
{
return userscore;
}
public int getUserpower()
{
return userpower;
}
public int getTotalpost()
{
return totalpost;
}
public String getWeblog()
{
return weblog;
}
public String getFace()
{
return face;
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -