File:school_page.htm
Method:query.scalar(columns,*where,*order)
关键字 'and' 附近有语法错误。 select top 1 CatalogName FROM cocatalog WHERE CatalogId= and AreaId=1
数据库执行错误
xmls/news.xmls
...content=['<div style="color: #FF0000; font-size: 12px; height: 45px; line-height: 45px; text-align: center;">对不起,当前没有数据!</div>'];
@pager=$empty;
}
$return(@content);
}

//新闻详情
$sub viewNews(){
@querycata=$query(catalog,content);
@querycontent=$query(content,content);
@ContentId=$argv(0);
@querycontent[ContentId]=@ContentId;
@CatalogId=@querycontent.scalar(CatalogId,['ContentId={*ContentId}']);
@querycata[CatalogId]=@CatalogId;
@AreaId=$shell[AreaId];
@querycata[AreaId]=@AreaId;
@
cataname=@querycata.scalar(CatalogName,['CatalogId={*CatalogId} and AreaId=1']);
@rowcontent=@querycontent.row(@ContentId);
@Modified=$empty;
$if(@rowcontent<>$null){
@Modified=@rowcontent[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 newsid(){
@query=...