{"status":"error","error":"query_failed","query":"SELECT products.id,products.`code`,products.price_1,products.price_2,products.supplierid\r\n\t\t\t\t,if(products.quantity>0,1,if(products.supplierid=1,1,0)) as availability\r\n\t\t\t\t,LEAST(products.price_1,IF(ifnull(products.price_2,0)>0, products.price_2,999999999)) as nowprice\r\n\t\t\t \t,IFNULL(thisFamily.familyid,concat('p',products.id)) as fam\r\n\t\t\t \t,group_concat(distinct familyproducts.id,',',familyproducts.code,',',familyproducts.price_1 order by familyproducts.price_1 separator '#') as otherproducts\r\n\t\t\t\t,if(thisFamily.familyid\r\n\t\t\t\t\t,group_concat(distinct pics.articleid,',',pics.id,',',pics.safename,',',pics.extension order by pics.articleid,pics.pictureorder separator '#')\r\n\t\t\t\t\t,group_concat(distinct pic.articleid,',',pic.id,',',pic.safename,',',pic.extension order by pic.pictureorder separator '#')) as pics\r\n\t\t\t\t\t,group_concat(distinct pic.articleid,',',pic.id,',',pic.safename,',',pic.extension order by pic.pictureorder separator '#') as backuppic\r\n\t\t\t\t,families.family_el as familyname\r\n\r\n\t\t\tfrom productscats,pictures as pic,products\r\n\t\t\t \t\t\t\tleft join familyproducts as thisFamily on (thisFamily.productid=products.id)\r\n\t\t\t\t\t\t\tleft join families on (families.id=thisFamily.familyid)\r\n\t\t\t \t\t\t\tleft join familyproducts as restInFamily on (families.id=restInFamily.familyid)\r\n\t\t\t \t\t\t\t\tleft join products as familyproducts on (familyproducts.id=restInFamily.productid\r\n\t\t\t \t\t\t\t\t\tand familyproducts.price_1>1\r\n\t\t\t \t\t\t\t\t\tand familyproducts.active_el=1\r\n\t\t\t \t\t\t\t\t\tand if(familyproducts.quantity>0,true,if(familyproducts.supplierid=1,true,false)))\r\n\t\t\t \t\t\t\t\tleft join pictures as pics on (pics.articleid=familyproducts.id and pics.type=2)\r\n\t\t\twhere 1=1\r\n\t\t\t\tand pic.articleid=products.id and pic.type=2\r\n\t\t\t\tand products.id=productscats.productid and productscats.subcategoryid=classiclights\r\n\t\t\t\tand products.price_1>0 and products.price_1 is not null\r\n\t\t\t\tand products.active_el=1\r\n\t\t\t-- \tand pictures.articleid=products.id and pictures.type=2\r\n\t\t\tgroup by fam\r\n\t\t\torder by nowprice asc,fam\r\n\t\t\tlimit 0,60","dberrno":null,"dberror":null}