В процессоре:
//-------------------------------------------------------------- public function prepareQueryBeforeCount(xPDOQuery $c) { $c->where(array( 'parent' => $this->getProperty('parent'), )); if($this->getProperty('sort')=='rand') $c->sortBy('RAND()'); $s = $c->prepare(); print $c->toSQL(); $s->execute(); print '<pre>'; print_r($s->errorInfo()); return $c; } }
выдает
SELECT `modResource`.`id` AS `modResource_id`, `modResource`.`type` AS `modResource_type`, `modResource`.`contentType` AS `modResource_contentType`, `modResource`.`pagetitle` AS `modResource_pagetitle`, `modResource`.`longtitle` AS `modResource_longtitle`, `modResource`.`description` AS `modResource_description`, `modResource`.`alias` AS `modResource_alias`, `modResource`.`link_attributes` AS `modResource_link_attributes`, `modResource`.`published` AS `modResource_published`, `modResource`.`pub_date` AS `modResource_pub_date`, `modResource`.`unpub_date` AS `modResource_unpub_date`, `modResource`.`parent` AS `modResource_parent`, `modResource`.`isfolder` AS `modResource_isfolder`, `modResource`.`introtext` AS `modResource_introtext`, `modResource`.`content` AS `modResource_content`, `modResource`.`richtext` AS `modResource_richtext`, `modResource`.`template` AS `modResource_template`, `modResource`.`menuindex` AS `modResource_menuindex`, `modResource`.`searchable` AS `modResource_searchable`, `modResource`.`cacheable` AS `modResource_cacheable`, `modResource`.`createdby` AS `modResource_createdby`, `modResource`.`createdon` AS `modResource_createdon`, `modResource`.`editedby` AS `modResource_editedby`, `modResource`.`editedon` AS `modResource_editedon`, `modResource`.`deleted` AS `modResource_deleted`, `modResource`.`deletedon` AS `modResource_deletedon`, `modResource`.`deletedby` AS `modResource_deletedby`, `modResource`.`publishedon` AS `modResource_publishedon`, `modResource`.`publishedby` AS `modResource_publishedby`, `modResource`.`menutitle` AS `modResource_menutitle`, `modResource`.`donthit` AS `modResource_donthit`, `modResource`.`privateweb` AS `modResource_privateweb`, `modResource`.`privatemgr` AS `modResource_privatemgr`, `modResource`.`content_dispo` AS `modResource_content_dispo`, `modResource`.`hidemenu` AS `modResource_hidemenu`, `modResource`.`class_key` AS `modResource_class_key`, `modResource`.`context_key` AS `modResource_context_key`, `modResource`.`content_type` AS `modResource_content_type`, `modResource`.`uri` AS `modResource_uri`, `modResource`.`uri_override` AS `modResource_uri_override`, `modResource`.`hide_children_in_tree` AS `modResource_hide_children_in_tree`, `modResource`.`show_in_tree` AS `modResource_show_in_tree`, `modResource`.`properties` AS `modResource_properties` FROM `modx_site_content` AS `modResource` WHERE `modResource`.`parent` = 9 ORDER BY RAND() ASC Array ( [0] => 00000 [1] => [2] => )
и на выходе процессора пусто.