File:cn/goodstwo.html
Method:query.scalar(columns,*where,*order)
关键字 'and' 附近有语法错误。
select top 1 CatalogName FROM gocatalog WHERE CatalogId= and AreaId=1
数据库执行错误
cn/xmls/product.xmls
...t);
$if(@count==0){
@content=['<div style="color:#FF0000;font-size:12px;height:45px;line-height:45px;text-align:center;">对不起,当前没有数据!</div>'];
@Pager=$empty;
}
$return($empty);
}
//查询内容
$sub viewProduct(){
@querygoods=$query(goods,goods);
@querycata=$query(catalog,goods);
@GoodsId=$http.get(pid);
@querygoods[GoodsId]=@GoodsId;
@AreaId=$shell[AreaId];
@querycata[AreaId]=1;
@parentid=@querygoods.scalar(CatalogId,['GoodsId={*GoodsId}']);
@querycata[CatalogId]=@parentid;
@cataname=@querycata.scalar(CatalogName,['CatalogId={*CatalogId} and AreaId={*AreaId}']);
@rowdata=@querygoods.row(@GoodsId);
//判断图片是否存在
@picc=["/cn/images/demopic.jpg"];
@pic=@rowdata[CAS];
$if(@pic<>$null){
@src=["/files/images/goods/{@pic}.jpg"];
$if($file.existsFile($file.getMapPath(@src))==1){
@picc=["{@src}"];
}
$else{
@pic=@rowdata[Pic];
$if(@pic<>$null){
@src=["/files/images/goods/{@pic}.jpg"];
$if($file.existsFile($file.getMapPath(@src))==1){
@picc=["{@src}"];
}
$else{
...