public int getTotleCount() {
conn = getConnection();
String sql ="select count(*) from tb_message where mstate =0";
try {
pstmt = conn.prepareStatement(sql);
rs = executeQuery(pstmt, null);
if(rs.next()){
return rs.getInt(1);
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
closeAll(conn, stmt, pstmt, rs);
}
return 0;
}
化龙贝
相关分类