Помогите с pdoMenu
Подскажите, что не так с вызовом?
[[pdoMenu? &parents=`8` &level=`0` &class=`msProduct` &leftJoin=`{ "data": { "class":"msProductData", "on":"msProduct.id = data.id" } }` &select=`{"msProduct": "*", "data": "master,link"}` &where=`{"data.link:=":"1","data.master:=":"[[*id]]"}` &showLog=`1` ]]Цель: вывести все связи данного товара в древовидном меню, разложенные по своим категориям.Как поправить, чтобы работало?
Комментарии: 25
В логах что пишет?
Доброй ночи)))
Вот лог:
0.0073030: pdoTools loaded
0.0000460: xPDO query object created
0.0001979: leftJoined msProductData as data
0.0001671: 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`, `content`, `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.0000691: Added selection of msProductData:
0.0062330: Processed additional conditions
0.0071208: Added where condition: data.link:==1, data.master:==53, msProduct.parent:IN(8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496), OR:msProduct.id:IN(386,529), msProduct.published=1, msProduct.hidemenu=0, msProduct.deleted=0, msProduct.context_key=web
0.0000589: Sorted by msProduct.menuindex, ASC
0.0005500: 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`.`content`, `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`, `` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `data` ON msProduct.id = data.id WHERE ( `data`.`link` = '1' AND `data`.`master` = '53' AND ( `msProduct`.`parent` IN (8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496) OR `msProduct`.`id` IN (386,529) ) AND `msProduct`.`published` = 1 AND `msProduct`.`hidemenu` = 0 AND `msProduct`.`deleted` = 0 AND `msProduct`.`context_key` = 'web' ) ORDER BY msProduct.menuindex ASC „
0.0009861: Could not process query, error #1054: Unknown column '' in 'field list'
0.0000782: Tree was built
0.0196829: Total time
9 437 184: Memory usage
Был подобный вопрос в 14м году. Василий так его прокомментировал:… 2. Вызов pdoMenu с leftJoin свойств товара msProductData… Я попробовал… Видать не хватает навыка(((
Вот лог:
0.0073030: pdoTools loaded
0.0000460: xPDO query object created
0.0001979: leftJoined msProductData as data
0.0001671: 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`, `content`, `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.0000691: Added selection of msProductData:
0.0062330: Processed additional conditions
0.0071208: Added where condition: data.link:==1, data.master:==53, msProduct.parent:IN(8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496), OR:msProduct.id:IN(386,529), msProduct.published=1, msProduct.hidemenu=0, msProduct.deleted=0, msProduct.context_key=web
0.0000589: Sorted by msProduct.menuindex, ASC
0.0005500: 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`.`content`, `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`, `` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `data` ON msProduct.id = data.id WHERE ( `data`.`link` = '1' AND `data`.`master` = '53' AND ( `msProduct`.`parent` IN (8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496) OR `msProduct`.`id` IN (386,529) ) AND `msProduct`.`published` = 1 AND `msProduct`.`hidemenu` = 0 AND `msProduct`.`deleted` = 0 AND `msProduct`.`context_key` = 'web' ) ORDER BY msProduct.menuindex ASC „
0.0009861: Could not process query, error #1054: Unknown column '' in 'field list'
0.0000782: Tree was built
0.0196829: Total time
9 437 184: Memory usage
Был подобный вопрос в 14м году. Василий так его прокомментировал:… 2. Вызов pdoMenu с leftJoin свойств товара msProductData… Я попробовал… Видать не хватает навыка(((
Убери пожалуйста этот ужас в code.
Прости(((
Доброй ночи)))
Вот лог:
Вот лог:
0.0073030: pdoTools loaded 0.0000460: xPDO query object created 0.0001979: leftJoined msProductData as data 0.0001671: 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`, `content`, `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.0000691: Added selection of msProductData: 0.0062330: Processed additional conditions 0.0071208: Added where condition: data.link:==1, data.master:==53, msProduct.parent:IN(8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496), OR:msProduct.id:IN(386,529), msProduct.published=1, msProduct.hidemenu=0, msProduct.deleted=0, msProduct.context_key=web 0.0000589: Sorted by msProduct.menuindex, ASC 0.0005500: 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`.`content`, `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`, `` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `data` ON msProduct.id = data.id WHERE ( `data`.`link` = '1' AND `data`.`master` = '53' AND ( `msProduct`.`parent` IN (8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496) OR `msProduct`.`id` IN (386,529) ) AND `msProduct`.`published` = 1 AND `msProduct`.`hidemenu` = 0 AND `msProduct`.`deleted` = 0 AND `msProduct`.`context_key` = 'web' ) ORDER BY msProduct.menuindex ASC " 0.0009861: Could not process query, error #1054: Unknown column '' in 'field list' 0.0000782: Tree was built 0.0196829: Total time 9 437 184: Memory usage
(del)
Он реально добавляет пустое поле в выборку:
Можешь явно указать те поля, которые тебе нужны, вместо *.:
Он реально добавляет пустое поле в выборку:
.... `msProduct`.`properties`, ``
Я не знаю по чему…Можешь явно указать те поля, которые тебе нужны, вместо *.:
&select=`{"msProduct": "pagetitle, content", "data": "master,link"}`
Та же история
0.0086091: pdoTools loaded
0.0000451: xPDO query object created
0.0002141: leftJoined msProductData as data
0.0000882: Added selection of msProduct: SQL_CALC_FOUND_ROWS `pagetitle`
0.0000651: Added selection of msProductData:
0.0060220: Processed additional conditions
0.0069320: Added where condition: data.link:==1, data.master:==53, msProduct.parent:IN(8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496), OR:msProduct.id:IN(386,529), msProduct.published=1, msProduct.hidemenu=0, msProduct.deleted=0, msProduct.context_key=web
0.0000670: Sorted by msProduct.menuindex, ASC
0.0004508: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `msProduct`.`pagetitle`, `` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_products` `data` ON msProduct.id = data.id WHERE ( `data`.`link` = '1' AND `data`.`master` = '53' AND ( `msProduct`.`parent` IN (8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496) OR `msProduct`.`id` IN (386,529) ) AND `msProduct`.`published` = 1 AND `msProduct`.`hidemenu` = 0 AND `msProduct`.`deleted` = 0 AND `msProduct`.`context_key` = 'web' ) ORDER BY msProduct.menuindex ASC "
0.0040321: Could not process query, error #1054: Unknown column '' in 'field list'
0.0006371: Tree was built
0.0221550: Total time
9 437 184: Memory usage
После двоеточия нет имен нужных полей. Так и должно быть?
0.0000651: Added selection of msProductData:
0.0000651: Added selection of msProductData:
Тут похожая проблема была — Может деинсталяция вылечит это дело?
А в логах MODX есть что-нибудь интересное?
А в логах MODX есть что-нибудь интересное?
Или в msProductData нет полей link и master?
Тогда в какой таблице искать?
Тогда в какой таблице искать?
Вот этот:
[[pdoMenu?
&parents=`8`
&level=`0`
&class=`msProduct`
&tpl=`@INLINE <li[[+classes]]><a href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
&leftJoin=`{
"data": {
"class":"msProductLink", "on":"msProduct.id = data.slave"
}
}`
&select=`{"msProduct": "pagetitle", "data": "master,link"}`
&where=`{"data.link:=":"1","data.master:=":"[[*id]]"}`
&showLog=`1`
&sortby=`id`
]]
Говорит, что собрал 13 строк:0.0089409: pdoTools loaded
0.0000589: xPDO query object created
0.0005951: leftJoined msProductLink as data
0.0000920: Added selection of msProduct: SQL_CALC_FOUND_ROWS `pagetitle`
0.0000598: Added selection of msProductLink: `master`, `link`
0.0059202: Processed additional conditions
0.0068121: Added where condition: data.link:==1, data.master:==53, msProduct.parent:IN(8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496), OR:msProduct.id:IN(386,529), msProduct.published=1, msProduct.hidemenu=0, msProduct.deleted=0, msProduct.context_key=web
0.0000660: Sorted by msProduct.id, ASC
0.0004840: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `msProduct`.`pagetitle`, `data`.`master`, `data`.`link` FROM `modx_site_content` AS `msProduct` LEFT JOIN `modx_ms2_product_links` `data` ON msProduct.id = data.slave WHERE ( `data`.`link` = '1' AND `data`.`master` = '53' AND ( `msProduct`.`parent` IN (8,9,10,11,32,40,44,50,51,57,70,80,12,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29,536,14,253,556,35,36,37,38,39,553,554,41,42,43,45,46,47,48,555,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,74,77,72,73,548,549,550,551,552,75,76,537,538,539,540,541,542,78,79,543,544,545,546,547,81,82,83,84,85,86,87,88,89,90,150,163,170,178,91,95,99,109,115,119,122,129,136,139,143,146,149,92,93,94,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,237,242,245,246,247,248,250,252,254,255,256,257,258,259,260,261,337,338,339,340,96,97,98,463,464,465,466,467,468,100,103,106,101,102,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,104,105,305,312,307,308,309,313,314,311,315,316,317,318,319,320,321,322,323,324,107,108,295,296,329,330,331,332,333,334,335,336,110,111,112,113,114,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,116,117,118,469,470,471,472,473,475,120,121,530,531,532,533,534,519,520,521,522,523,524,525,526,528,535,123,126,124,125,127,128,130,133,131,132,264,262,263,134,135,497,498,499,500,501,137,138,510,511,512,513,514,515,516,517,518,140,141,142,502,503,505,504,507,508,509,144,145,476,477,478,479,147,148,557,558,559,560,561,562,151,154,159,160,161,162,152,153,155,156,157,158,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,164,165,166,167,168,169,171,175,176,172,173,174,563,564,565,566,567,568,569,570,571,572,573,574,575,177,179,180,181,185,490,491,492,493,182,183,484,485,486,487,488,489,494,495,496) OR `msProduct`.`id` IN (386,529) ) AND `msProduct`.`published` = 1 AND `msProduct`.`hidemenu` = 0 AND `msProduct`.`deleted` = 0 AND `msProduct`.`context_key` = 'web' ) ORDER BY msProduct.id ASC "
0.0077610: SQL executed
0.0018868: Total rows: 13
0.0000370: Rows fetched
0.0000689: Returning raw data
0.0000181: Tree was built
0.0276849: Total time
9 437 184: Memory usage
Только не выводит в шаблоне((((
Ром, как теперь их вывести?(((
с пустым tpl выведи, это покажет что там за плейсхолдеры есть.
Вот тут страничка:
Разрабатываемая страница
В табе «Совместимое оборудование» должно быть меню, как слева. Строки, судя по логу, он из базы собрал, и выводит, но без категорий((( Просто список 13 связанных продуктов. Как теперь добавить категории в вывод?
Разрабатываемая страница
В табе «Совместимое оборудование» должно быть меню, как слева. Строки, судя по логу, он из базы собрал, и выводит, но без категорий((( Просто список 13 связанных продуктов. Как теперь добавить категории в вывод?
Так выводит?
[[pdoMenu?
&parents=`8`
&class=`msProduct`
&tpl=`@INLINE <li[[+classes]]><a href="[[+link]]" [[+attributes]]>[[+menutitle]]</a>[[+wrapper]]</li>`
&leftJoin=`{
"data": {
"class":"msProductLink", "on":"msProduct.id = data.slave"
}
}`
&where=`{"data.link:=":"1","OR:data.master:=":"[[*id]]"}`
&showLog=`1`
]]
Марат, спасибо. Но выводит то же самое: сами товары без своих категорий((( Тот же результат будет, если мы просто выведем через msProducts…
Чтобы категории выводило надо добавить их, если это контейнеры, то:
&where=`{"data.link:=":"1","OR:data.master:=":"[[*id]]", "OR:isfolder:=":1}`
Марат, спасибо! Выводит!))) Теперь подскажите, как вывести только те категории, в которых лежат связи, а остальные спрятать? Буду безумно благодарен, и если ты в Москве, приеду к тебе с пивом!)))
Марат, Вы поможете мне вывести только категории, в которых содержатся связи?
Да мне и поэкспериментировать сейчас негде.
А вообще, мне кажется, нужно не leftJoin использовать, а innerJoin
А вообще, мне кажется, нужно не leftJoin использовать, а innerJoin
Ну поэкспериментировать можешь прям на месте))) На сайте, который разрабатываем)))
Ром, ты тут?
Вот тут страничка:
Разрабатываемая страница
В табе «Совместимое оборудование» должно быть меню, как слева. Строки, судя по логу, он из базы собрал, но не выводит, гад(((
Разрабатываемая страница
В табе «Совместимое оборудование» должно быть меню, как слева. Строки, судя по логу, он из базы собрал, но не выводит, гад(((
[2016-09-21 00:58:43] (ERROR @ /home/testred/bmsensors.ru/docs/core/components/pdotools/model/pdotools/pdofetch.class.php : 170) [pdoTools] Error 42S22: Unknown column '' in 'field list'
Такое много раз)))
Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.