我的SQL语句在MYSQL中是正确,可是我要用php输出,而$rsh=mysql_db_query('paper',$query,$dbh);只能执行一条呀?????

解决方案 »

  1.   

    编号 员工姓名 标著总数   应有总数  符合总数   正确率 
    1     aaaa    共 5 条         
    2     bbbb    共 9 条        
    3     cccc    共 218 条        
    4     dddd    共 5 条       
    php+mysql这是我想要的结果表,现在我通过对users,rec_user这两张表查出结果,但是"应有总数"要对record表查询才能得到结果呀!!那我的SQL语句要怎样写呢???record内的字段(newdate//报纸日期,edition版本)
      

  2.   

    select u_name,count(*) as totalsum
    from users,rec_user
    where date_format(ru_idate,'%c/%e/%Y')='".$strDate."'
    and ru_iuser=u_id
    group by u_name
    order by totalsum desc