質問 > フロント機能 > 商品 並び替え機能の不具合 |
フロント機能
フラット表示 | 前のトピック | 次のトピック |
投稿者 | スレッド |
---|---|
ryerye |
投稿日時: 2024/1/10 15:55
対応状況: 開発中
|
新米 登録日: 2023/12/15 居住地: 投稿: 7 |
商品 並び替え機能の不具合 環境 ローカル
[EC-CUBE] バージョン 4.0.5 [PHP] 7.4.15 [データベース] mysql 5.7.33 [WEBサーバ] Apache/2.4.57 () OpenSSL/1.0.2k-fips PHP/7.4.15 ユーザー画面側に関する質問です。 商品の表示順を高い順、低い順、名前順に並び替えしたいのですが、いづれもうまくいかず、でたらめな並びになります。 An exception occurred while executing 'SELECT DISTINCT d0_.id AS id_0, MAX(d1_.price02) AS sclr_1, d0_.id AS id_2 FROM dtb_product d0_ INNER JOIN dtb_product_category d2_ ON d0_.id = d2_.product_id AND d2_.discriminator_type IN ('productcategory') INNER JOIN dtb_category d3_ ON d2_.category_id = d3_.id AND d3_.discriminator_type IN ('category') INNER JOIN dtb_product_class d1_ ON d0_.id = d1_.product_id AND d1_.discriminator_type IN ('productclass') WHERE (d0_.product_status_id = 1 AND d2_.category_id IN (?) AND d1_.visible = 1 AND d1_.sale_type_id IN (?, ?)) AND d0_.discriminator_type IN ('product') ORDER BY sclr_1 DESC, d0_.id DESC LIMIT 200' with params [20, "1", "3"]: SQLSTATE[42000]: Syntax error or access violation: 1140 In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'root.d0_.id'; this is incompatible with sql_mode=only_full_group_by こういったエラーがでています。 group byが原因っぽいのでしょうが、なにをどう修正すれば想定通り動くのかまったくわかりません。 なにか参考になりそうなことを教えていただけないでしょうか |
フラット表示 | 前のトピック | 次のトピック |
題名 | 投稿者 | 日時 |
---|---|---|
» 商品 並び替え機能の不具合 | ryerye | 2024/1/10 15:55 |
Re: 商品 並び替え機能の不具合 | mcontact | 2024/1/10 16:20 |
Re: 商品 並び替え機能の不具合 | ryerye | 2024/1/10 16:44 |
Re: 商品 並び替え機能の不具合 | mcontact | 2024/1/10 16:58 |
Re: 商品 並び替え機能の不具合 | tattsu | 2024/1/10 17:00 |