Question
Counting the Total
i am doing testing on a application where i count the ads
based on sessions here is the query;
SELECT count(classified.classifiedID) as cAds, classified.ccat
FROM classified where postedby = '#session.user.username#'
GROUP BY ccat
well if i have two different categories, it show me as the results in the output window as 21 means 2 records of category ASA and 1 record of category BSB
it does not show me the total records for the specific logged in user.
and below i am geeting like:
total records: 21 records
2 for ASA
1 for BSB
but i want it like;
total records: 3 records
2 for ASA
1 for BSB
hope u guys understood...
is something wrong in query or should i use ike SUM function of SQL or whatever
SELECT count(classified.classifiedID) as cAds, classified.ccat
FROM classified where postedby = '#session.user.username#'
GROUP BY ccat
well if i have two different categories, it show me as the results in the output window as 21 means 2 records of category ASA and 1 record of category BSB
it does not show me the total records for the specific logged in user.
and below i am geeting like:
total records: 21 records
2 for ASA
1 for BSB
but i want it like;
total records: 3 records
2 for ASA
1 for BSB
hope u guys understood...
is something wrong in query or should i use ike SUM function of SQL or whatever