if($getall==0 && isset($refObj->Fields['tags']) && !empty($refObj->Fields['aid']))
{
$dsql->SetQuery("Select tid From `dede_taglist` where aid = '{$refObj->Fields['aid']}' ");
$dsql->Execute();
$ids = '';
while($row = $dsql->GetArray())
{
$ids .= ( $ids=='' ? $row['tid'] : ','.$row['tid'] );
}
if($ids != '')
{
$addsql = " where id in($ids) ";
}
if($addsql=='') return '';
}
else if($getall==2)
{
$addsql = " where typeid='{$refObj->Fields['typeid']}' ";
}
else
{
if(!empty($typeid))
{
$addsql = " where typeid='$typeid' ";
}
|