Using GROUP BY problem
Posted: Tue Sep 04, 2007 8:57 am
Dear Friends,
I want to sum up the field 'B'. By using this query
$query = SELECT SUM(B) AS A FROM `maza` WHERE DATE = 2007-06-06 GROUP BY DATE
But this is not working.
In that 'maza' tables are having two record on the date 2007-06-06. I want to sum up the value which date are group by same date.
Please suggest me,
Thanks in advance.
Regards,
Maza
I want to sum up the field 'B'. By using this query
$query = SELECT SUM(B) AS A FROM `maza` WHERE DATE = 2007-06-06 GROUP BY DATE
But this is not working.
In that 'maza' tables are having two record on the date 2007-06-06. I want to sum up the value which date are group by same date.
Please suggest me,
Thanks in advance.
Regards,
Maza