File:cn/content-catalog.htm
Method:query.map(columns,*where,*order)
在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - 无法打开到 SQL Server 的连接)
数据库执行错误
cn/xmls/news.xmls
...apcat=@querycat.map(['CatalogName,PageStyle'],['{*PageName =} and {*AreaId = $shell.getData(cn)}']);
$if(@Mapcat){
$shell[@Mapcat[PageStyle]]=1;
@CatalogName=@Mapcat[CatalogName];
}
$else{
@CatalogName=新闻列表;
}
$shell[Title]=$join(@CatalogName,-,$shell.getData(metaTitle));
$shell.put(@Mapcat);
$return($empty);
}
//动态标题
$sub startContent(){
@querycontent=$query(content,content);
@ContentId=$argv(0,0);
@querycontent[ContentId]=@ContentId;
@Title=@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;
}...