Column 'iPosition' in where clause is ambiguous
SELECT SQL_CALC_FOUND_ROWS `products`.*, `promoted`.`iPromotedMin`, `producers`.`sName` AS `prodsName`, `producers`.`sLogoUrl` AS `prodsLogoUrl`, `products`.`TiAvailable` AS `iAvailable`, `products`.`fPrice` AS `fCatalogPrice`, `vat`.`fVatValue`, ss12_pl_calculateProductPriceForUser( NULL, `products`.`iProduct`, 0 ) AS `fPrice`, LEAST( `products`.`TiCanBuy`, ss12_pl_getProductCanBuyForUser ( NULL, `products`.`iProduct` ) ) AS `iCanBuy`, `products`.`TiVariantsCount` AS `iVariantCount`, ss12_pl_getProductVisiblePriceForUser ( NULL, `products`.`iProduct` ) AS `iVisiblePrice` FROM `ss12_pl_products` AS `products` INNER JOIN ( SELECT DISTINCT `iProduct` FROM `ss12_pl_products_pages` WHERE `iPage` IN ( 70 ) ) AS `pp` USING( `iProduct` ) LEFT JOIN ( SELECT MIN( `iPromoted` ) `iPromotedMin`, `iProduct` FROM `ss12_pl_products_promoted` GROUP BY `iProduct` ) `promoted` USING( `iProduct` ) INNER JOIN `ss12_vat` AS `vat` USING( `iVat` ) LEFT JOIN `ss12_pl_producers` AS `producers` USING( `iProducer` ) WHERE 1 AND `iPosition` <= 30 AND ss12_pl_getProductVisibleForUser ( NULL, `products`.`iProduct` ) >= 1 AND `products`.`iStatus` >= 1 ORDER BY `products`.`iPosition` ASC, `products`.`sName` ASC, `products`.`iTime` ASC LIMIT 0,30