ตรง number มันไม่ตรงตามจริงครับ Y_Y ต้องแก้ยังไงหรอครับ _/|\_ Code (SQL)
SELECT tbsarary.Id_Pla, tbsarary.date, tbsarary.playersarary, tbplayer.Id_Pla, tbplayer.Name_Pla, tbplayer.Position_Pla, tbplayer.Lavel, tbpractice_player.Date_Pty, tbpractice_player.Id_Pla, COUNT( tbpractice_player.Id_Pla ) AS number
FROM tbpractice_player
LEFT JOIN tbplayer ON tbpractice_player.Id_Pla = tbplayer.Id_Pla
LEFT JOIN tbsarary ON tbplayer.Id_Pla = tbsarary.Id_Pla
WHERE DATE_FORMAT( tbpractice_player.Date_Pty, '%Y-%m' ) = '2014-01'
GROUP BY tbplayer.Id_Pla ASC
SELECT tbsarary.Id_Pla, tbsarary.date, tbsarary.playersarary, tbplayer.Id_Pla, tbplayer.Name_Pla, tbplayer.Position_Pla, tbplayer.Lavel, tbpractice_player.Date_Pty, tbpractice_player.Id_Pla, (SELECT COUNT( Id_Pla ) FROM tbpractice_player WHERE WHERE DATE_FORMAT( tbpractice_player.Date_Pty, '%Y-%m' ) = '2014-01') AS number
FROM tbpractice_player
LEFT JOIN tbplayer ON tbpractice_player.Id_Pla = tbplayer.Id_Pla
LEFT JOIN tbsarary ON tbplayer.Id_Pla = tbsarary.Id_Pla
WHERE DATE_FORMAT( tbpractice_player.Date_Pty, '%Y-%m' ) = '2014-01'
GROUP BY tbplayer.Id_Pla ASC