File:product3.html
Method:query.scalar(columns,*where,*order)
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
数据库执行错误
xmls/product.xmls
...
@querygcata=$query(catalog,goods);
@id=$http.get(cid);
@querygcata[ParentId]=@id;
@AreaId=$shell[AreaId];
@querygcata[AreaId]=@AreaId;
@tablectmn=@querygcata.table(*,['Status>0 and ParentId={*ParentId} and AreaId={*AreaId}'],['Grade asc,CatalogId asc']);
@listta=@tablectmn.format(@format){
}
$return(@listta);
}


//品牌内容
$sub viewProduct(){
@querycata=$query(catalog,goods);
@cid=$http.get(cid);
@querycata[CatalogId]=@cid;
@AreaId=$shell[AreaId];
@querycata[AreaId]=@AreaId;
@
cataname=@querycata.scalar(CatalogName,['CatalogId={*CatalogId} and AreaId={*AreaId}']);
@rowdata=@querycata.map(*,['CatalogId={*CatalogId} and AreaId={*AreaId}']);
$if(@rowdata==$null){
@rowdata=$map();
}
$return($empty);
}

//详情页品牌推荐
$function recommendProduct(format){
@querygoods=$query(catalog,goods);
@AreaId=$shell[AreaId];
@querygoods[AreaId]=@AreaId;
@tablegs=@querygoods.table(*,['Status>0 and AreaId={*AreaId}'],['Grade desc,CatalogId asc'],4);
@goodlist=@tablegs.format(@for...