Queried list count

Getting your data onto paper - or the web - Discussing the reports features of Base

Queried list count

Postby tservice » Wed Apr 02, 2008 9:31 pm

I have a report that will list equipment and a list of customers. How can I get a total count of the customers retrieved from mysql?
tservice
 
Posts: 3
Joined: Wed Apr 02, 2008 9:24 pm

Re: queried list count

Postby wurzel » Thu Apr 03, 2008 10:17 am

Hi,

With the COUNT() command in your SQL statement ?

Alex
wurzel
Volunteer
 
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: queried list count

Postby tservice » Thu Apr 03, 2008 4:25 pm

I do have the count command, however the count returns the total in the database not the total returned from the query.
tservice
 
Posts: 3
Joined: Wed Apr 02, 2008 9:24 pm

Re: queried list count

Postby wurzel » Thu Apr 03, 2008 10:47 pm

tservice wrote:I do have the count command, however the count returns the total in the database not the total returned from the query.


Then you'll have to explain your query, because COUNT() only counts the results returned. If you search for all customers beginning with "T%", then you can count the number of customers that meet that criteria.

http://dev.mysql.com/doc/refman/5.0/en/ ... -rows.html

Alex
wurzel
Volunteer
 
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: queried list count

Postby tservice » Thu Apr 03, 2008 11:08 pm

The attached file shows my query settings. I must not fully understand how to properly setup count (*)
Attachments
ScreenShot002.jpg
tservice
 
Posts: 3
Joined: Wed Apr 02, 2008 9:24 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 1 guest