/** *调用指定栏目的信息 *@paramint $channelid[栏目ID] *@paramstring $field[调用字段,默认整个数组] *@returnstring||array */ functiongetChannelInfo($channelid,$field){ global$dsql; $channelid=(int)$channelid; $sqlquery=S
* 调用指定栏目的信息
* @param int $channelid [栏目ID]
* @param string $field [调用字段,默认整个数组]
* @return string || array
*/
function getChannelInfo($channelid, $field) {
global $dsql;
$channelid = (int) $channelid;
$sqlquery = "SELECT * FROM `dede_arctype` WHERE `id` = '{$channelid}' LIMIT 0,1";
$cInfo = $dsql->GetOne($sqlquery);
if (!is_array($cInfo) || empty($cInfo)) {
return FALSE;
}
if (!empty($field)) {
return $cInfo[$field];
}
return $cInfo;
}