> フロント機能 > DQLのORDER BYで商品を並び替えしたい |
フロント機能
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
boss12 |
投稿日時: 2016/7/22 17:37
対応状況: 開発中
|
常連 登録日: 2016/2/17 居住地: 投稿: 53 |
DQLのORDER BYで商品を並び替えしたい ECCUBE3.10
以下のコードで,dtb_productのproduct_idで並び替えをしたいのですが、通常通りの表示で並び替えができません。 どこが間違っていますでしょうか? よろしくお願いいたします。 Controllerの中身です。(省略しています) $Products = $app['eccube.repository.product']->createQueryBuilder('p') ->innerJoin('p.ProductCategories', 'pc') ->innerJoin('p.ProductClasses', 'pclass') ->innerJoin('pclass.ProductStock' , 'ps') ->where('pc.category_id = 27') ->andWhere('ps.stock > 0') ->setMaxResults(12) ->setFirstResult(1) ->orderBy('p.id', 'DESC') ->getQuery() ->getResult(); |
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |