$m=$empire->query("select id,classid,mtype from {$dbtbpre}ecms_".$tbname." where classid in(7,9,8,22,44,14) limit 300");
while($k=$empire->fetch($m))
 {
$id=$k[id];
$classid=(int)$k[classid];
$mtype=$k[mtype];
if ($mtype=="出售"){
$ttid=1;}
    elseif($mtype=="求购"){
$ttid=2;}
else {$ttid=3;}
echo "<div>".$id."-".$classid."-".$mtype."-".$ttid."<div>";
//$sql2=$empire->query("update {$dbtbpre}ecms_flea set ttid='$ttid' where id='$id' and classid='$classid'");
 }显示结果是
2-7-求购-3
25-7-出售-3
26-7-出售-3
27-7-出售-3
28-7-出售-3
29-7-出售-3
47-7-出售-3
54-7-出售-3
92-7-出售-3
112-7-出售-3
126-7-出售-3
142-7-出售-3
149-7-求购-3
难道php不能判断汉字?