File:cn/goods.htm
Method:query.table(columns,*where,*order,*top)
'=' 附近有语法错误。 select * FROM jxshopcart WHERE UserId=0 and TempId=0 and AreaId=
数据库执行错误
cn/xmls/shopcart.xmls
...//购物车列表
$sub shopList(format){
@call=$call(xmls/public.xmls);
@call.load();
@queryShopcart=$query(shopcart,config);
@queryGoods=$query(goods,goods);
@queryItem=$query(item,goods);
@userid=$session[UserId];
@queryShopcart[UserId]=0;
@queryShopcart[TempId]=0;
$if($session[TempId]){
@queryShopcart[TempId]=$session[TempId];
@queryShopcart[UserId]=0;
}
$if(@userid){
@queryShopcart[UserId]=@userid;
@queryShopcart[TempId]=0;
}
@queryShopcart[AreaId]=$shell[AreaId];
@totalAmount=0;
@
tableShopcart=@queryShopcart.table(*,['UserId={*UserId} and TempId={*TempId} and AreaId={*AreaId}']);
@pcshoplists=@tableShopcart.format(@format){

@row=@queryGoods.map(*,['{*GoodsId = $var[GoodsId]}']);
$if(@row==$empty||@row==$null){
@row=$map();
@Pic=$empty;
}
$else{
@Pic=["{#root}files/images/goods/{@row[GoodsCode]}.png"];
$if(@row[Pic]){
$if($file.existsFile($file.getMapPath(@row[Pic]))==1){
@Pic=@row[Pic];
}
}
}
@Amount=($var[Quantity]*$var[Price]);

@totalAmount=(@totalA...