preparedStatement = connection.prepareStatement(sql);
preparedStatement.setString(1,logname);
resultSet = preparedStatement.executeQuery();
if(resultSet.next()){
flag = true;
}else{
flag = false;
}
这边用count(*),无论是否查询到,都会使result=true,所以查询语句以后用
select * from
网友评论