Office中国论坛/Access中国论坛

标题: 问题好久了。请大家都来看看。。。 [打印本页]

作者: jusi21    时间: 2007-8-27 10:21
标题: 问题好久了。请大家都来看看。。。
表basket有字段:id,userid , goodsid ,ordertime,ordercount,saleprice,userchecked,ordernumber,posttime,adminchecked
表goods有字段:id,typeid,name,sn_number,producer,package,saleprice,storeprice,countent,posttime,readcount,buycount,imagefile

要求获取显示数据库内容的字段有:ordernumber    userid     posttime        goodsid   name     saleprice     ordercount

我的数据查询是这样的写的:sql_order="select b.*,g.name from basket b,goods g where b.adminchecked="&iflag&" and b.goodsid=g.id"

上面定义了:iflag=Request.Querystring("flag")
报错是这样的:语法错误(操作符丢失)在查询表达式‘b.adminchecked="&iflag&" and b.goodsid=g.id '中,然后我把="&iflag&" 改成='&iflag&'  它又报错与数据库中的内型不匹配.....麻烦大家帮帮ACCESS菜鸟我看看。。。谢谢了!!!




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3