File:newPage.htm
Method:query.table(columns,*where,*order,*top)
关键字 'and' 附近有语法错误。
select ContentId,Title FROM cocontent WHERE CatalogId=61 and AreaId= and Status>0 ORDER BY Grade desc,CreateDate desc
数据库执行错误
xmls/new.xmls
...@map);
$return(@Pagelist);
$write($empty);
}
//报名参加
$ajax addUsermse(){
@querymessgae=$query(forum,forum);;
@querymessgae[AreaId]=1;
@querymessgae.post();
@inb=@querymessgae.insert(1);
$if(@inb>0){
$write($map.serialize(Status,ok,goto,$shell.view(index)).toJson());
$end();
}
$else{
$write($map.serialize(Status,no).toJson());
$end();
}
}
$sub TeachingM(format,CatalogId){
@query=$query(content,content);
@query[AreaId]=$shell.getData(cn);
@query[CatalogId]=@CatalogId;
@tableMap=@query.table(['ContentId,Title'],['CatalogId={*CatalogId} and AreaId={*AreaId} and Status>0'],['Grade desc,CreateDate desc']);
@Pagelist=@tableMap.format(@format);
$return(@Pagelist);
}
$sub mapiew(){
@query=$query(catalog,content);
@query=$query(content,content);
@query[ContentId]=$argv(0,$null);
@pageMap=@query.map(['Title,Subtitle,Body,Pic,Description'],['ContentId={*ContentId} and Status=1']);
$return($empty);
}