File:cn/content.htm
Method:query.map(columns,*where,*order)
在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接)
数据库执行错误
cn/xmls/news.xmls
...itle=@querycontent.scalar(Title,ContentId={*ContentId});
$shell[Title]=$join(@Title,-,$shell.getData(metaTitle));
$return($empty);
}
//正文
$sub contentView(PageName){
@querynew=$query(content,content);
@querycat=$query(catalog,content);
@querycat[PageName]=@PageName;
@CatalogId=@querycat.scalar(['CatalogId'],['{*PageName =} and {*AreaId = $shell.getData(cn)}']);
@querynew[CatalogId]=@CatalogId;
@Body=@querynew.scalar(Body,['Status>0 and {*AreaId = $shell.getData(cn)} and {*CatalogId =}']);
$if(!@Body){
@Body=no data;
}
$return(@Body);
}
//列表
$sub contentList(countc,listFormat,pageFormat){
@row=$map();
@querynew=$query(content,content);
@querycat=$query(catalog,content);
@querycat[PageName]=$argv(0,$null);
@CatalogId=@querycat.scalar(['CatalogId'],['{*PageName =} and {*AreaId = $shell.getData(cn)}']);
@querynew[CatalogId]=@CatalogId;
@listnews=@querynew.pager(*,['Status>0 and {*AreaId = $shell.getData(cn)} and {*CatalogId =}'],['Grade desc,Modified desc,Conte...