if(!empty($typeid))修改成:$ Z5 q# c" C) [. w
{8 |0 o6 a+ H4 h
$addsql = ” where typeid=’$typeid’ “;
}2 ]+ \- m$ h/ `, B9 F
$dsql->SetQuery(“Select tid From `#@__taglist` where arcrank<=-1″); $dsql->Execute();! A6 \4 C+ N4 u: u0 K' T! F这样就不会显示的未审核稿件的标签.
$ids = ”;) M9 f2 k# {# Z
while($row = $dsql->GetArray())( a" `5 n& `) X* M# M
{
$tid = $row['tid'];
$cquery = “Select count(*) as dd From `#@__taglist` where tid = $tid and arcrank<=-1″;" m N- T3 m, ?2 \& T* i$ N
$crow = $dsql->GetOne($cquery);% j1 N& ^% `4 P0 E% h
if(!$crow['dd'])
{2 T0 q4 `$ P q4 @* Q% C( s8 r6 J
$ids .= ( $ids==” ? $row['tid'] : ‘,’.$row['tid'] );1 I# Q2 K# K, s! \! u, Y
}
}
if($ids != ”)6 @9 S9 e: Y; l
{8 }* m- y. j# @) f; b# P- K9 t! l/ L
$addsql = ” where id not in($ids) “;& t$ s* K u+ K) t* U. X- t7 }. o
}" Y' K% M' D$ F
if(!empty($typeid))' B+ {& R" U& d$ |' u1 @7 n$ m
{
if($addsql)
{9 O3 H0 `4 L( H* ^
$addsql .= ” and typeid=’$typeid’ “;2 x; G$ v: i2 c: O% z( e7 c
}else{
$addsql = ” where typeid=’$typeid’ “; G& ^: r( x2 d% s
}( s$ r. @# h8 {' K) v0 A- D
}6 G8 z7 v* F# w0 w1 m( w. C; i
欢迎光临 航空论坛_航空翻译_民航英语翻译_飞行翻译 (http://bbs.aero.cn/) | Powered by Discuz! X2 |