SUZUKI WAGON R
SQL
SELECT * , KAT.URLNAME AS KATURLNAME FROM M_KATASHIKI KAT LEFT OUTER JOIN M_SHASHU SHA ON SHA.SHACODE = KAT.SHACODE AND SHA.MAKCODE = KAT.MAKCODE LEFT OUTER JOIN ( SELECT MAKCODE , SHACODE ,KATNAME AS KATNAME1 , MIN(NENSHIKIFR) AS FROMOLD, MAX(NENSHIKIFR) AS FROMNEW, MIN(NENSHIKITO) AS TOOLD, MAX(NENSHIKITO) AS TONEW FROM M_KATASHIKI KAT WHERE KAT.HYOJIFLG = 1 GROUP BY MAKCODE, SHACODE, KATNAME1 ) kts ON kts.MAKCODE= KAT.MAKCODE AND kts.SHACODE= KAT.SHACODE AND kts.KATNAME1= KAT.KATNAME WHERE SHA.URLNAME ='wagon_r' AND KAT.HYOJIFLG = 1 ORDER BY NENSHIKIFR,NENSHIKITO, MC,GRADE
Array
(
[wagon_r_mh21s_22s_1] => Array
(
[NAME] => MH21S/22S
[NAMEEN] => MH21S/22S
[SHANAMEEN] => WAGON R
[ORDER] => 5
[GRADE] => 全車対応
[MC] =>
[MODELYEAR] => '03/09-'08/09
[YEAR] => '03/09-'08/09
[COUNT] => 0
)
[wagon_r_mh23s_1] => Array
(
[NAME] => MH23S
[NAMEEN] => MH23S
[SHANAMEEN] => WAGON R
[ORDER] => 5
[GRADE] => 全車対応
[MC] =>
[MODELYEAR] => '08/09-'12/09
[YEAR] => '08/09-'12/09
[COUNT] => 1
)
[wagon_r_mh34s_44s_1] => Array
(
[NAME] => MH34S/44S
[NAMEEN] => MH34S/44S
[SHANAMEEN] => WAGON R
[ORDER] => 5
[GRADE] => 全車対応
[MC] =>
[MODELYEAR] => '12/09-'17/02
[YEAR] => '12/09-'17/02
[COUNT] => 2
)
[wagon_r_mh35s_55s_1] => Array
(
[NAME] => MH35S/55S
[NAMEEN] => MH35S/55S
[SHANAMEEN] => WAGON R
[ORDER] => 5
[GRADE] => 全車対応
[MC] =>
[MODELYEAR] => '17/02-
[YEAR] => '17/02-
[COUNT] => 3
)
)
MH21S/22S '03/09-'08/09
MH23S '08/09-'12/09
MH34S/44S '12/09-'17/02
MH35S/55S '17/02-