select 作家 from 小说数据表格 where 小说数据表格.类型 like %指定类型%
group by 作家如果类型是很明确的:
select 作家 from 小说数据表格 where 小说数据表格.类型 = 指定类型
group by 作家

解决方案 »

  1.   

    不好意思,好象这样也不能直接得到个数,还要用mysql_num_rows()来取得个数的,不知道有没有人可以直接查到个数?
    关注!
      

  2.   

    select count(auther) from tablename where type = $type;
      

  3.   

    select count(id) from tablename where type = $type group by auther;
      

  4.   

    select count(unique author) from tablename where type='type';
      

  5.   

    select count(unique 作者) from 表名where 符合条件;
      

  6.   

    各位的好像都不行。应该是
    select count(distinct author) from tabalname where type='$type'