Пример #1
0
 protected function setSelection(xPDOQuery $c)
 {
     $c = parent::setSelection($c);
     $c->leftJoin('modResource', "Parent");
     $c->select(array("Product.id as `product_id`", "Parent.id as category_id", "Parent.uri as category_uri", "Parent.pagetitle as category_title"));
     return $c;
 }
Пример #2
0
 protected function setSelection(xPDOQuery $c)
 {
     $c = parent::setSelection($c);
     $alias = $c->getAlias();
     $c->innerJoin('modUserProfile', "AuthorProfile", "AuthorProfile.internalKey = Author.id");
     $c->select(array("Parent.pagetitle as section_title", "AuthorProfile.photo as author_avatar"));
     # $c->prepare();
     # print $c->toSQL();
     #
     # print '<pre>';
     #
     #
     # exit;
     return $c;
 }