&sortbyTVType=`integer` не удается отсортировать
Подскажите что я делаю не так? Тип ввода указан как число.
Должно сортировать как числа, а сортирует как текст.
Должно сортировать как числа, а сортирует как текст.
[[!pdoPage?
&element=`msProducts`
&tpl=`tpl.msProducts.row.catalog`
&limit=`25`
&sortbyTV=`Ду`
&sortbyTVType=`integer`
&sortdirTV=`ASC`
&showLog=`1`
]]
Комментарии: 3
0.0000598: xPDO query object created
0.0008380: Included list of tvs: Ду
0.0003068: leftJoined msProductData as Data
0.0002670: leftJoined msVendor as Vendor
0.0004511: leftJoined modTemplateVarResource as TVДу
0.0000041: Grouped by msProduct.id
0.0000989: Added selection of msProduct: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000360: Added selection of msProductData: `article`, `price`, `old_price`, `weight`, `image`, `thumb`, `vendor`, `made_in`, `new`, `popular`, `favorite`, `tags`, `color`, `size`, `source`
0.0000350: Added selection of msVendor: `name` AS `vendor.name`, `resource` AS `vendor.resource`, `country` AS `vendor.country`, `logo` AS `vendor.logo`, `address` AS `vendor.address`, `phone` AS `vendor.phone`, `fax` AS `vendor.fax`, `email` AS `vendor.email`, `description` AS `vendor.description`, `properties` AS `vendor.properties`
0.0000219: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `Ду`
0.0000620: Replaced TV conditions
0.0015481: Processed additional conditions
0.0019829: Added where condition: class_key=msProduct, msProduct.parent:IN(64033,64139,64140,64141,64142,64143,64144,64145,64146,64147,64148,64149,64150,64151,64152,64153,64154,64155,64156,64157,64158,64159,64160,64161,64162,64163,64164,64165,64166,64167,64168,64169,64170,64171,64172,64173,64174,64175,64176,64177,64178,64179,64180,64181,64182,64183,64184,64185,64186,64187,64188,64189,64190), msProduct.published=1, msProduct.deleted=0
0.0000379: Replaced TV conditions
0.0001121: Sorted by Ду, ASC
0.0000050: Limited to 25, offset 50
0.0005169: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `msProduct`.`id`, `msProduct`.`type`, `msProduct`.`contentType`, `msProduct`.`pagetitle`, `msProduct`.`longtitle`, `msProduct`.`description`, `msProduct`.`alias`, `msProduct`.`link_attributes`, `msProduct`.`published`, `msProduct`.`pub_date`, `msProduct`.`unpub_date`, `msProduct`.`parent`, `msProduct`.`isfolder`, `msProduct`.`introtext`, `msProduct`.`richtext`, `msProduct`.`template`, `msProduct`.`menuindex`, `msProduct`.`searchable`, `msProduct`.`cacheable`, `msProduct`.`createdby`, `msProduct`.`createdon`, `msProduct`.`editedby`, `msProduct`.`editedon`, `msProduct`.`deleted`, `msProduct`.`deletedon`, `msProduct`.`deletedby`, `msProduct`.`publishedon`, `msProduct`.`publishedby`, `msProduct`.`menutitle`, `msProduct`.`donthit`, `msProduct`.`privateweb`, `msProduct`.`privatemgr`, `msProduct`.`content_dispo`, `msProduct`.`hidemenu`, `msProduct`.`class_key`, `msProduct`.`context_key`, `msProduct`.`content_type`, `msProduct`.`uri`, `msProduct`.`uri_override`, `msProduct`.`hide_children_in_tree`, `msProduct`.`show_in_tree`, `msProduct`.`properties`, `Data`.`article`, `Data`.`price`, `Data`.`old_price`, `Data`.`weight`, `Data`.`image`, `Data`.`thumb`, `Data`.`vendor`, `Data`.`made_in`, `Data`.`new`, `Data`.`popular`, `Data`.`favorite`, `Data`.`tags`, `Data`.`color`, `Data`.`size`, `Data`.`source`, `Vendor`.`name` AS `vendor.name`, `Vendor`.`resource` AS `vendor.resource`, `Vendor`.`country` AS `vendor.country`, `Vendor`.`logo` AS `vendor.logo`, `Vendor`.`address` AS `vendor.address`, `Vendor`.`phone` AS `vendor.phone`, `Vendor`.`fax` AS `vendor.fax`, `Vendor`.`email` AS `vendor.email`, `Vendor`.`description` AS `vendor.description`, `Vendor`.`properties` AS `vendor.properties`, IFNULL(`TVДу`.`value`, '') AS `Ду` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `Data` ON `msProduct`.`id`=`Data`.`id` LEFT JOIN `modx_ms2_vendors` `Vendor` ON `Data`.`vendor`=`Vendor`.`id` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVДу` ON `TVДу`.`contentid` = `msProduct`.`id` AND `TVДу`.`tmplvarid` = 35 WHERE ( `msProduct`.`class_key` = 'msProduct' AND `msProduct`.`parent` IN (64033,64139,64140,64141,64142,64143,64144,64145,64146,64147,64148,64149,64150,64151,64152,64153,64154,64155,64156,64157,64158,64159,64160,64161,64162,64163,64164,64165,64166,64167,64168,64169,64170,64171,64172,64173,64174,64175,64176,64177,64178,64179,64180,64181,64182,64183,64184,64185,64186,64187,64188,64189,64190) AND `msProduct`.`published` = 1 AND `msProduct`.`deleted` = 0 ) GROUP BY msProduct.id ORDER BY Ду ASC LIMIT 50, 25 "
0.0001211: SQL executed
0.0000839: Total rows: 52
0.0000420: Rows fetched
0.0000951: Returning raw data
0.0012391: Checked the active modifiers
0.0108569: Loaded chunk "tpl.msProducts.row.catalog"
0.0022869: Loaded options for products
0.0000091: Returning processed chunks
0.0260992: Total time
10 747 904: Memory usage
modx.pro/help/3692/
Ваша проблема
Ваша проблема
Да я тоже погуглил, предварительно. Тип стоит число это написано в самом начале.
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.