File:news-03.html
Method:query.map(columns,*where,*order)
关键字 'ORDER' 附近有语法错误。 ORDER BY ContentId desc
数据库执行错误
xmls/news.xmls
...ent[Modified];
@Modified=$datetime.format(@Modified,yyyy-MM-dd);
@Click=@rowcontent[Click];
@querycontent[ContentId]=@ContentId;
@querycontent[Click]=(@Click+1);
@querycontent.update();
}
$else{
@rowcontent=$map();
@rowcontent[Title]=无数据;
}
$return($empty);
}

//新闻内容上一篇下一篇
$sub prevnextG(){
@query=$query(content,content);
@query[AreaId]=$shell[AreaId];
@query[ContentId]=$http.get(id);
@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=$shell.path(news-02.html,["id={@nextrow[ContentId]}"]);
@prevtitle=["{@nextrow[Title]}"];
}
$else{
@prevhref=["javascript:void(0)"];
@prevtitle=["无上一篇"];
}
//下一条
$if(@nextrow<>$empty&&@prevrow<>$nul...