文章列表出现MySQL server error report:Array 问题

2016-07-07 15:16 来源:www.chinab4c.com 作者:ecshop专家

g.is_delete = 0, limtit 0,5

这个有问题

g.is_delete = 0limtit 0,5

这样才是对的

回答:
是的,EC至尊说的很对哦!
我找到了问题所在,
就这段代码出了错,我以前删除了一些内容,用下面的这段换上了就正常了,
$sql = 'SELECT g.goods_id, g.goods_name, g.goods_thumb, g.goods_img, g.shop_price AS org_price, ' .
"IFNULL(mp.user_price, g.shop_price * '$_SESSION[discount]') AS shop_price, ".
'g.market_price, g.promote_price, g.promote_start_date, g.promote_end_date ' .
'FROM ' . $GLOBALS['ecs']->table('goods_article') . ' ga ' .
'LEFT JOIN ' . $GLOBALS['ecs']->table('goods') . ' AS g ON g.goods_id = ga.goods_id ' .
"LEFT JOIN " . $GLOBALS['ecs']->table('member_price') . " AS mp ".
"ON mp.goods_id = g.goods_id AND mp.user_rank = '$_SESSION[user_rank]' ".
"WHERE ga.article_id = '$id' AND g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0";
$res = $GLOBALS['db']->query($sql);