I have a php web page and I got a problem with counting data using group by in mysql query
When any question submitted, id is automatically add and idqu=0 if question replied then idqu is equal to replied question's id
My table and data
id idqu question answer user date
1 0 quest1 test 28042014
2 0 quest2 scott 29042014
3 2 reply1 andy 01052014
4 0 quest3 test 01052014
5 4 reply2 scot 01052014
My question is how can I count question's reply?
quest1 (0)
quest2 (1)
quest3 (1)