src/org/nutz/dao/util/Daos.java
@Deprecated
    public static long queryCount(Dao dao, String sql) {
        String tmpTable = "as _nutz_tmp";
        if (dao.meta().isDB2())
            tmpTable = "as nutz_tmp_" + R.UU32();
        else if (dao.meta().isOracle())
            tmpTable = "";
        else
            tmpTable += "_" + R.UU32();
        Sql sql2 = Sqls.fetchLong("select count(1) from (" + sql + ")" + tmpTable);
        dao.execute(sql2);
        return sql2.getLong();
    }
@Deprecated
    public static long queryCount(Dao dao, String sql) {
        String tmpTable = "as _nutz_tmp";
        if (dao.meta().isDB2())
            tmpTable = "as nutz_tmp_" + R.UU32();
        else if (dao.meta().isOracle())
            tmpTable = "";
        else
            tmpTable += "_" + R.UU32();
        Sql sql2 = Sqls.fetchLong("select count(1) from (" + sql + ")" + tmpTable);
        dao.execute(sql2);
        return sql2.getLong();
    }
查询某sql的结果条数. 请使用Sql接口的版本