.SQL: SELECT `g`.`idgoods`, IF((select count(`ga`.`idgoods`) from `goods` `ga` where `ga`.`goods_idgoods` = `g`.`idgoods`) > 0,1,IF(`g`.`goods_idgoods`=0,0,1)) as `needsdropdown`, -- IF(IFNULL((select CONCAT("[",min(`GB`.`value`),"-",max(`GB`.`value`),"]") from `goods` `GB` where `GB`.`goods_idgoods` = `g`.`idgoods`),true),true,false) as `addtobasket_flag`, 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`, IF(IFNULL((select CONCAT("[",min(`GB`.`value`),"-",max(`GB`.`value`),"]") from `goods` `GB` where `GB`.`goods_idgoods` = `g`.`idgoods`),true), IF(`g`.`goods_idgoods`=0,'',(select GROUP_CONCAT(CONCAT('')) from `goods` `gg` where `gg`.`goods_idgoods`=`g`.`goods_idgoods`)) , (select GROUP_CONCAT(CONCAT('')) from `goods` `gg` where `gg`.`goods_idgoods`=`g`.`idgoods`) ) as ext2, `g`.`name` as `name`, `g`.`unit`, -- IFNULL((select CONCAT("[",min(`GG`.`value`),"-",max(`GG`.`value`),"]") from `goods` `GG` where `GG`.`goods_idgoods` = `g`.`idgoods`),format(`g`.`value`,0)) as `value`, 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 `value`, `g`.`cost`, `g`.`overhead`, `g`.`discount`, `g`.`orderpoint`, `g`.`valuecanchange`, `g`.`template`, `g`.`set`, `g`.`salefromstock`, `g`.`individuallynosaleflag`, `g`.`barcode`, `g`.`note`, `g`.`grossweight`, `g`.`packedweight`, `g`.`length`, `g`.`width`, `g`.`height`, `g`.`goodstype_idgoodstype`, `g`.`active`, `g`.`qty`, `g`.`decimalflag`, `g`.`quantityflag`, ExtractValue(`g`.`xml`, '//root/g/html') as `html`, (SELECT group_concat( CONCAT( CONCAT('

',`name`,'

'), CONCAT('

',`HTML`,'

'), '
') ) FROM `swatch` `s` WHERE ((ExtractValue(`g`.`xml`, '//root/g/ct') COLLATE utf8_persian_ci) REGEXP REPLACE(REPLACE(ExtractValue(`s`.`xml`, '//root/c/sc'),'_','.'),',','|')) and IF( LENGTH(TRIM(`s`.`HTML`))>0,true,false) ) as `swatch_html`, (SELECT group_concat( CONCAT('
  • ' , `name` , '
  • ') ) FROM `swatch` `s` WHERE ((ExtractValue(`g`.`xml`, '//root/g/ct') COLLATE utf8_persian_ci) REGEXP REPLACE(REPLACE(ExtractValue(`s`.`xml`, '//root/c/sc'),'_','.'),',','|')) and IF( LENGTH(TRIM(`s`.`HTML`))>0,true,false) ) as `swatch_links` FROM `goods` `g` WHERE `g`.`idgoods`={(id)}; 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 '(id)}' at line 64 iduser: _SESSION['iduser']:

    محصولات

    img
    img
    img
    img
    shape
    shape
    .SQL: SELECT `g`.`idgoods`, IF((select count(`ga`.`idgoods`) from `goods` `ga` where `ga`.`goods_idgoods` = `g`.`idgoods`) > 0,1,IF(`g`.`goods_idgoods`=0,0,1)) as `needsdropdown`, -- IF(IFNULL((select CONCAT("[",min(`GB`.`value`),"-",max(`GB`.`value`),"]") from `goods` `GB` where `GB`.`goods_idgoods` = `g`.`idgoods`),true),true,false) as `addtobasket_flag`, 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`, IF(IFNULL((select CONCAT("[",min(`GB`.`value`),"-",max(`GB`.`value`),"]") from `goods` `GB` where `GB`.`goods_idgoods` = `g`.`idgoods`),true), IF(`g`.`goods_idgoods`=0,'',(select GROUP_CONCAT(CONCAT('')) from `goods` `gg` where `gg`.`goods_idgoods`=`g`.`goods_idgoods`)) , (select GROUP_CONCAT(CONCAT('')) from `goods` `gg` where `gg`.`goods_idgoods`=`g`.`idgoods`) ) as ext2, `g`.`name` as `name`, `g`.`unit`, -- IFNULL((select CONCAT("[",min(`GG`.`value`),"-",max(`GG`.`value`),"]") from `goods` `GG` where `GG`.`goods_idgoods` = `g`.`idgoods`),format(`g`.`value`,0)) as `value`, 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 `value`, `g`.`cost`, `g`.`overhead`, `g`.`discount`, `g`.`orderpoint`, `g`.`valuecanchange`, `g`.`template`, `g`.`set`, `g`.`salefromstock`, `g`.`individuallynosaleflag`, `g`.`barcode`, `g`.`note`, `g`.`grossweight`, `g`.`packedweight`, `g`.`length`, `g`.`width`, `g`.`height`, `g`.`goodstype_idgoodstype`, `g`.`active`, `g`.`qty`, `g`.`decimalflag`, `g`.`quantityflag`, ExtractValue(`g`.`xml`, '//root/g/html') as `html`, (SELECT group_concat( CONCAT( CONCAT('

    ',`name`,'

    '), CONCAT('

    ',`HTML`,'

    '), '
    ') ) FROM `swatch` `s` WHERE ((ExtractValue(`g`.`xml`, '//root/g/ct') COLLATE utf8_persian_ci) REGEXP REPLACE(REPLACE(ExtractValue(`s`.`xml`, '//root/c/sc'),'_','.'),',','|')) and IF( LENGTH(TRIM(`s`.`HTML`))>0,true,false) ) as `swatch_html`, (SELECT group_concat( CONCAT('
  • ' , `name` , '
  • ') ) FROM `swatch` `s` WHERE ((ExtractValue(`g`.`xml`, '//root/g/ct') COLLATE utf8_persian_ci) REGEXP REPLACE(REPLACE(ExtractValue(`s`.`xml`, '//root/c/sc'),'_','.'),',','|')) and IF( LENGTH(TRIM(`s`.`HTML`))>0,true,false) ) as `swatch_links` FROM `goods` `g` WHERE `g`.`idgoods`={(id)}; 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 '(id)}' at line 64 iduser: _SESSION['iduser']:
    بالا