DaoZen.Message: SQLSTATE[42000]: Syntax error or access violation: 1064 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 '-50' at line 41
DaoZen.Location: /www/gifts24.pl/framework/libs/daozen/queryBuilder.php at 331
DaoZen.Trace: #0 /www/gifts24.pl/framework/libs/daozen/queryBuilder.php(331): PDOStatement->execute()
#1 /www/gifts24.pl/framework/libs/daozen/records.php(138): DaoZen_QueryBuilder->select(Object(ProductItemSearch))
#2 /www/gifts24.pl/framework/libs/daozen.php(149): DaoZen_Records->select(Object(ProductItemSearch))
#3 /www/gifts24.pl/framework/libs/daozen/search.php(261): DaoZen->findBy(Object(ProductItemSearch))
#4 /www/gifts24.pl/runtime/admin/app/modules/product/productitem.php(382): DaoZen_Search->findAll()
#5 /www/gifts24.pl/runtime/gifts24/app/modules/index/indexApplication.php(371): ProductItem::getProducts(Object(ProductCategory), 50, true, 5, 'all', 'szczegoly', 0, 'katalog')
#6 [internal function]: IndexApplication->actionCatalog('gifts', 'katalog', 'gifts', '21')
#7 /www/gifts24.pl/framework/controller.php(692): call_user_func_array(Array, Array)
#8 /www/gifts24.pl/framework/callisto.php(641): Controller->execute()
#9 /www/gifts24.pl/framework/callisto.php(714): Callisto->initController()
#10 /www/gifts24.pl/index.php(20): Callisto->run()
#11 {main}
DaoZen.Query: (SELECT `product_item`.*,
m.location as thumbnail,
cat.name_pl as category_name,
cat.display_name_pl as category_display_name,
cat.parent_id as parent_id,
cat.lft AS lft,
cat.rgt as rgt,
v.marge as marge,
IF (a4 = 0,
`product_item`.price * (1 + marge /100),
IF (a4 = 1,
`product_item`.price,
`product_item`.price * (1 + (marge * -1) /100)
)
) as price,
(SELECT GROUP_CONCAT(CAST(parent.id as char),"\t\t",parent.name_pl,"\t\t",parent.display_name_pl,"\t\t",parent.nice_pl ORDER BY parent.lft SEPARATOR "\n")
FROM `product_category` AS node, `product_category` AS parent
WHERE node.lft BETWEEN parent.lft AND parent.rgt
AND node.id = `product_item`.category_id
) AS path,
(SELECT GROUP_CONCAT(mm.location SEPARATOR "\n")
FROM `product_item` AS vid
LEFT JOIN `meta` mm ON vid.image = mm.id
WHERE `product_item`.id = vid.variant) AS vimgs
FROM `product_item`
LEFT JOIN `product_category` cat ON cat.id = `product_item`.category_id
LEFT JOIN `meta` m ON `product_item`.image = m.id
LEFT JOIN `product_vendor` v ON `product_item`.vendor_id = v.id
WHERE (`product_item`.`avail`=:where0 AND `product_item`.`vendor_id`=:where1 AND (`product_item`.`category_id`=:where2 OR (cat.`lft`>=:where3 AND cat.`rgt`<=:where4)))
HAVING (`price`>=:where5 AND `price`<=:where6))
LIMIT 50 OFFSET -50