MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT g.goods_id, g.last_update, g.goods_name, g.goods_name_style, g.market_price, g.shop_price AS org_price, g.promote_price, g.zuan_pic_man,g.zuan_pic_woman,g.zuan_zhu_man,g.zuan_zhu_woman,g.18K_weight,g.K_weight_woman,g.zuan_fushi_price_man,g.zuan_fushi_price_woman,g.zhonglei,g.gongfei_beishu,g.gongfei_beishu_woman,g.sujin_weight,g.sujin_radio, s.K_price,s.PT_price,s.gongfei_price,s.beishu,s.AU_price,s.PD_price,s.zuan_bei,s.shichang,g.new_dinghun,g.new_paixu,g.new_duijie,g.new_nvjie,g.new_nanjie,g.new_taozhuang,g.new_diaozhui,g.xilie_feicui,g.xilie_shuoming,g.xilie_paixu,g.xilie_shuoming_down,xilie_zhenzhu,xilie_chaibao,xilie_bojin,xilie_Kjin,index_is_hot,index_hot_paixu,list_hot_paixu,list_is_hot,if(g.zhonglei = 1 || g.zhonglei = 5, (g.zuan_zhu_man * g.zuan_pic_man * s.zuan_bei+ g.18K_weight * s.K_price + g.gongfei_beishu * s.gongfei_price + g.zuan_fushi_price_man)*s.beishu,if(g.zhonglei = 2,(g.zuan_zhu_man * g.zuan_pic_man * s.zuan_bei + g.zuan_zhu_woman * zuan_pic_woman* s.zuan_bei + g.18K_weight * s.K_price + g.K_weight_woman * s.K_price + g.gongfei_beishu * s.gongfei_price + g.gongfei_beishu_woman * s.gongfei_price + g.zuan_fushi_price_man + g.zuan_fushi_price_woman)*s.beishu,if(g.zhonglei = 3,if(g.sujin_radio='1',g.sujin_weight * (s.K_price+15),if(g.sujin_radio='2',g.sujin_weight * s.AU_price,if(g.sujin_radio='3',g.sujin_weight * s.PT_price,if(g.sujin_radio='4',g.sujin_weight * s.PD_price, g.sujin_weight * s.AU_price)))),if(g.zhonglei = 4 ,(g.feicui_num * g.feicui_pri + g.feicui_18K * s.K_price + g.feicui_fspri + g.feicui_gf * s.gongfei_price)*s.beishu ,if(g.zhonglei = 6,if(g.zz_color=2,(g.zz_price * g.zz_num * s.zz_bai + g.zz_18K_weight * s.K_price + g.zz_fushi_price + g.zz_gongfei * s.gongfei_price)*s.beishu,if(g.zz_color=3,(g.zz_price * g.zz_num * s.zz_jin + g.zz_18K_weight * s.K_price + g.zz_fushi_price + g.zz_gongfei * s.gongfei_price)*s.beishu,(g.zz_price * g.zz_num + g.zz_18K_weight * s.K_price + g.zz_fushi_price + g.zz_gongfei * s.gongfei_price)*s.beishu)),if(g.zhonglei = 7,g.zuan_pic_man * s.zuan_bei,if(g.zhonglei = 9,(g.baoshi_price + g.baoshi_18K * s.K_price + g.baoshi_fspri + g.baoshi_gf * s.gongfei_price)*s.beishu, if(g.zhonglei = 10,(g.youji_price + g.youji_18K * s.K_price + g.youji_fspri + youji_gf * s.gongfei_price)*s.beishu,if(g.zhonglei = 11, g.dingji_gf ,if(g.zhonglei = 13 , g.dj_price ,if(g.zhonglei = 12 , g.cz_price ,0))))))))))) as shop_price, promote_start_date, promote_end_date, g.goods_brief, g.goods_thumb, g.goods_img, RAND() AS rnd FROM `52shehua_com`.`ecs_goods` AS g LEFT JOIN `52shehua_com`.`ecs_goods_shuxin` AS s ON s.id = 1 LEFT JOIN `52shehua_com`.`ecs_member_price` AS mp ON mp.goods_id = g.goods_id AND mp.user_rank = '0' WHERE g.is_on_sale = 1 AND g.is_alone_sale = 1 AND g.is_delete = 0 AND g.cat_id= ORDER BY Rand() limit 4 ) [2] => Array ( [error] => You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY Rand() limit 4' at line 1 ) [3] => Array ( [errno] => 1064 ) )