select * from (select id,username,password from table where <condition>) a,(select count(*) as num from table where <condition>)好像是这样写的,如果你用的是MYSQL的话,可能会有改动,MYSQL的功能很弱的.

解决方案 »

  1.   

    我用的oracle
    sql="select count(*) num from (select id,username,password from table where 条件)"
      

  2.   

    mysql里面有一个函数就是记录的条数,为什么不用那个
    mysql_num_rows()
      

  3.   

    mysql里面有一个函数就是记录的条数,为什么不用那个
    mysql_num_rows()-----------------
    分页