织梦php 怎样调用指定栏目文章 10
代码如下,我只想调用栏目ID=5的文章,怎样修改//头条推荐$dsql->SetQuery("Selectid,title,litpic,flag,description...
代码如下,我只想调用栏目ID=5的文章,怎样修改
//头条推荐
$dsql->SetQuery("Select id,title,litpic,flag,description From `#@__archives` where channel=1 And arcrank = 0 AND FIND_IN_SET('h',flag) order by id desc limit 0,4");
$dsql->Execute();
while($row=$dsql->GetObject())
{
$hotfoucs .= "<div class='toutiao pd10'><h2><a href='wap.php?action=article&id={$row->id}'>".ConvertStr($row->title)."</a></h2><div class='cont'><a href='wap.php?action=article&id={$row->id}'><img class='fl' src='{$row->litpic}'></a><p>".cut_str(ConvertStr($row->description),45)."</p></div><div class='clr'></div></div>";
} 展开
//头条推荐
$dsql->SetQuery("Select id,title,litpic,flag,description From `#@__archives` where channel=1 And arcrank = 0 AND FIND_IN_SET('h',flag) order by id desc limit 0,4");
$dsql->Execute();
while($row=$dsql->GetObject())
{
$hotfoucs .= "<div class='toutiao pd10'><h2><a href='wap.php?action=article&id={$row->id}'>".ConvertStr($row->title)."</a></h2><div class='cont'><a href='wap.php?action=article&id={$row->id}'><img class='fl' src='{$row->litpic}'></a><p>".cut_str(ConvertStr($row->description),45)."</p></div><div class='clr'></div></div>";
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询