<?php include("conn.php") ?>
<? 
$read_zong_id=$_GET["zong_id"];
$sql="select id,exam_juan_name  from  fenlei   where  database_id=".$read_zong_id;
$sql=$sql." order by  exam_juan_name asc ";
$rs=$conn->execute($sql);
$ggg=0;
$cc="";
$dd="";
while(!$rs->EOF)
{
  $ggg=$ggg+1;
  $read_juan=$rs->fields["exam_juan_name"];
  $read_id=$rs->fields["id"];
  $cc=$cc.$read_juan."#";
  $dd=$dd.$read_id."#";
  $rs->MoveNext();
} 
$rs->close;
$conn->close;
$ee=$cc.$dd;
if ($ggg>10)
{
if ($ee!='' || $ee!="")
{
  echo "1".$ee;
}
  else
{
  echo "0";
} 
}
else
{
if ($ee!='' || $ee!="")
{
  echo "2".$ee;
}
  else
{
  echo "0";
} 	
}
?>
