SELECT
DISTINCT MONTH(datetime_end) as B,
(
SELECT
SUM(DATEDIFF(DAY, datetime_start, datetime_end))
FROM
[simrke].[trx_medical_ruang] MR,
[simrke].[trx_ruang] R
WHERE
MR.ruang_cd = R.ruang_cd AND
R.ruang_nm like 'BAKUNG%' AND
MONTH(MR.datetime_end) = MONTH(M.datetime_end)
)
FROM
[simrke].[trx_medical_ruang] M
ORDER BY B
预计会出现“加油”的结果,但执行php的结果是“来吧”。所以我不知道发生了什么。