img
img
img
img
shape
shape


.SQL: SELECT DISTINCT `G`.`idgoods`, `G`.`goods_idgoods`, `G`.`name`, IF(ExtractValue(`G`.`xml`, '//root/g/nostock')=1,'ناموجود',`G`.`valuecanchange`) as `valuecanchange`, IFNULL((select IF(min(`GG`.`value`)=max(`GG`.`value`), format(min(`GG`.`value`),0), CONCAT("[",min(`GG`.`value`),"-",max(`GG`.`value`),"]")) from `goods` `GG` where `GG`.`goods_idgoods` = `G`.`idgoods`), format(`G`.`value`,0) ) as `original`, IF(ExtractValue(`G`.`xml`, '//root/g/nostock')=1,'ناموجود',`G`.`valuecanchange`) as `valuecanchange`, IFNULL((select IF(min(`GG`.`value`)=max(`GG`.`value`), format(min(`GG`.`value`* (1-5/100)),0), CONCAT("[",min(`GG`.`value`* (1-5/100)),"-",max(`GG`.`value`* (1-5/100)),"]")) from `goods` `GG` where `GG`.`goods_idgoods` = `G`.`idgoods`), format(`G`.`value`* (1-5/100),0) ) as `value`, IF(IFNULL((select CONCAT("[",min(`GA`.`value`),"-",max(`GA`.`value`),"]") from `goods` `GA` where `GA`.`goods_idgoods` = `G`.`idgoods`),true), IF(ExtractValue(`G`.`xml`, '//root/g/nostock')=1, 'ناموجود', "افزودن به سبد خرید") ,"انتخاب سایز" ) as `addtobasket_message`, IF(IFNULL((select CONCAT("[",min(`GB`.`value`),"-",max(`GB`.`value`),"]") from `goods` `GB` where `GB`.`goods_idgoods` = `G`.`idgoods`),true), IF(ExtractValue(`G`.`xml`, '//root/g/nostock')=1, false, true), false) as `addtobasket_flag`, format(`G`.`value` * (1-5/100) / cast(ExtractValue(`G`.`xml`, '//root/g/uqty2') AS DECIMAL(10,2)),0) as `v`, if(isnull(`favoritegoods`.`goods_idgoods`),false, true) as `fav`, `G`.`xml` FROM `goods` G LEFT JOIN `favoritegoods` ON (`favoritegoods`.`goods_idgoods`=`G`.`idgoods`) and (`favoritegoods`.`user_iduser`=302 ) LEFT JOIN `goods_has_ordertype` X ON `X`.`goods_idgoods` = `G`.`idgoods` WHERE `G`.`template` = 1 and `G`.`active`=1 and ((`G`.`goods_idgoods`=0) OR ()) and `X`.`ordertype_idordertype` = 1 and ExtractValue(`G`.`xml`, '//root/g/ct') REGEXP REPLACE(REPLACE(IF('_____4_______'='','1','_____4_______'),'_','.'),',','|') -- and `G`.`name` like "%%" ORDER BY cast(ExtractValue(`G`.`xml`, '//root/g/priority') AS DECIMAL(10,2)) DESC LIMIT 0,9; 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 ')) and `X`.`ordertype_idordertype` = 1 and ExtractValue(`G`.`xml`, '' at line 30 iduser: _SESSION['iduser']:
بالا