File:demo/productShow.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)
数据库执行错误
demo/xmls/product.xmls
...rmat(@format);
$return(@content);
}
//查询产品列表列表-End

$sub productdetail(){
@querygoods=$query(goods,goods);
@id=$http.get(id);
@querygoods[GoodsID]=@id;
$if($string.isEmpty(@id)==0){
@view=@querygoods.map(*,['Status=1 and GoodsID={*GoodsID}']);
$if(@view==$null){
@view=$map();
}
}
$else{
@view=$map();
}
$return($empty);

}

//产品详情页面-Start
$sub getProductShow(){
@querygoods=$query(goods,goods);
@id=$http.get(id);
@querygoods[GoodsID]=@id;
$if($string.isEmpty(@id)==0){
@
mw=@querygoods.scalar(MW,['GoodsID={*GoodsID}']);
$if(@mw==$empty){
@mws=@mw;
}
$else{
@mws=$number.round(@mw,2);
}
@view=@querygoods.map(*,['Status=1 and GoodsID={*GoodsID}']);
$if(@view==$null){
@view=$map();
$write(['<script>alert("Abnormal data"); window.location = "product.html";</script>']);
}
}
$else{
@view=$map();
$write(['<script>alert("Abnormal data"); window.location = "product.html";</script>']);
}


//产品详情页面-End
//-------------------------------------------查询产品规格...