File:cn/news-details.htm
Method:query.map(columns,*where,*order)
关键字 'and' 附近有语法错误。
select top 1 * FROM cocontent WHERE CatalogId=1 and AreaId= and ContentId<13 ORDER BY ContentId desc
数据库执行错误
cn/xmls/news.xmls
...Click=@rowcontent[Click];
@querycontent[ContentId]=@ContentId;
@querycontent[Click]=(@Click+1);
@querycontent.update();
}
$else{
@rowcontent=$map();
@rowcontent[Title]=无数据;
}
$shell.put(@rowcontent);
$return($empty);
}
//新闻内容上一篇下一篇
$sub prevnextG(){
@call=$call(xmls/public.xmls);
@call.load();
@query=$query(content,content);
@query[AreaId]=$shell[AreaId];
@query[ContentId]=$argv(0);
@CatalogId=@query.scalar(CatalogId,ContentId={*ContentId});
@query[CatalogId]=@CatalogId;
@prevrow=@query.map(*,['CatalogId={*CatalogId} and AreaId={*AreaId} and ContentId<{*ContentId}'],['ContentId desc']);
@nextrow=@query.map(*,['CatalogId={*CatalogId} and AreaId={*AreaId} and ContentId>{*ContentId}'],['ContentId asc']);
//上一条
$if(@prevrow<>$empty&&@nextrow<>$null){
@prevhref=$join(../news-details,["/{@nextrow[ContentId]}.html"]);
@prevtitle=["{@nextrow[Title]}"];
}
$else{
@prevhref=["javascript:void(0)"];
@prevtitle=["无"];
}
//下一条
$if(@nextrow<>$empty&&@prevrow<>$null){...