解决方案 »

  1.   

    public ResultSet selectPID(int uid,String time) 
    {
    ResultSet resultSet = null;
    try 
    {
    PreparedStatement stmt = conn.prepareStatement("select id from path where 'userId'=? and startTime=?");
    stmt.executeQuery("set names utf8");
    stmt.setInt(1, uid);
    stmt.setString(2, time);
    resultSet = stmt.executeQuery();
    //stmt.closeOnCompletion();

    catch (SQLException e) 
    {
    e.printStackTrace();
    }
    return resultSet;
    }
    对不起我搞作错了,我之前返回空集是这个函数作为查询