File:product-evaluation.html
Method:query.scalar(columns,*where,*order)
语法错误 (操作符丢失) 在查询表达式 'CatalogId= and AreaId=1' 中。 select top 1 CatalogName FROM cpcatalog WHERE CatalogId= and AreaId=1
数据库执行错误
xmls/product.xmls
...querycomment=$query(comment,product);
@ProductId=$http.get(pid,0);

@querycomment[AreaId]=1;
@querycomment[ProductId]=@ProductId;
@ss=@querycomment.table(*,['ProductId={*ProductId} and AreaId={*AreaId}']);
@comlist=@ss.format(@format);
$return(@comlist);
}



$sub viewProduct(){
@querygoods=$query(product,product);
@querycata=$query(catalog,product);
@GoodsId=$http.get(pid);
@cid=$http.get(cid);
@querycata[CatalogId]=@cid;
@AreaId=$shell[AreaId];
@querycata[AreaId]=@AreaId;
@
cataname=@querycata.scalar(CatalogName,['CatalogId={*CatalogId} and AreaId={*AreaId}']);
@rowdata=@querygoods.row(@GoodsId);
@Modified=$empty;
$if(@rowdata==$null){
@rowdata=$map();
@rowdata[ProductName]=无数据;
$http.clear();
$write(404错误,文件未找到!);
$end();
}
$return($empty);
}