その違い、一目瞭然。
車種から選択
Array
(
[slug] => gs-i
[brand_code] => 10
)
SQL
SELECT MAK.* , SHA.* , SHA.URLNAME SHAURLNAME , SHA.URLNAME SHAURLNAME , GRP.GRPNAME FROM M_SHOHINGRP GRP LEFT OUTER JOIN M_JYOKEN JYO ON JYO.GRPCODE = GRP.GRPCODE LEFT OUTER JOIN M_MAKER MAK ON JYO.MAKCODE = MAK.MAKCODE LEFT OUTER JOIN M_SHASHU SHA ON JYO.MAKCODE = SHA.MAKCODE AND JYO.SHACODE = SHA.SHACODE LEFT OUTER JOIN ( SELECT GRPCODE, COUNT(HINCODE) AS COUNTS FROM M_HIN WHERE ECTORIFLG = 1 AND HINTEISHI IS NULL GROUP BY GRPCODE ) CNT ON CNT.GRPCODE = GRP.GRPCODE WHERE GRP.BRACODE = 10 AND GRP.HYOJIFLG = 1 AND NOT COALESCE( CNT.COUNTS, '0') = 0 GROUP BY SHA.MAKCODE , SHA.SHACODE ORDER BY SHA.SORTORDER DESC
Array
(
[voxy] => Array
(
[NAME] => ヴォクシー
[NAMEEN] => VOXY
[ORDER] => 90
[BRACODE] => 10
[COUNT] => 0
)
[noah] => Array
(
[NAME] => ノア
[NAMEEN] => NOAH
[ORDER] => 50
[BRACODE] => 10
[COUNT] => 1
)
[freed_plus] => Array
(
[NAME] => フリード プラス
[NAMEEN] => FREED+
[ORDER] => 40
[BRACODE] => 10
[COUNT] => 2
)
[freed] => Array
(
[NAME] => フリード
[NAMEEN] => FREED
[ORDER] => 40
[BRACODE] => 10
[COUNT] => 3
)
)
-
VOXY
ヴォクシー
-
NOAH
ノア
-
FREED+
フリード プラス
-
FREED
フリード