This topic is locked

Global Charts???

4/26/2008 8:37:51 AM
PHPRunner General questions
C
chaz author

It looks like the charts only does each row or dataset???
I cant see any way to actually do a global database charting or even reporting !!!!
For instance
i may have a field Gender m=0 f=1
i would like to know how many males and females in my database, how do i do this???

V
vytb 4/26/2008

Make (modify) a query, and that's it!

C
chaz author 4/27/2008

Make (modify) a query, and that's it!


huh????
the X-axis should have many fields and the y-axis should have the accumulative counts of the required field data value
eg
age 18-25 (30 persons bar on the y-axis)

age 26-30 (10 persons)

age 30+ (20 persons)

gender male (10 persons

gender female (20 persons)
etc

J
Jane 4/28/2008

Hi,
unfortunately you can't group two type of charts under one.

For example here is SQL query for the first chart:

select count(ID),

age

from TableName

group by age



and the second:

select count(ID),

gender

from TableName

group by gender

C
chaz author 4/28/2008

thanks for info so how do i group in age brackets ?? cheers

J
Jane 4/29/2008

Hi,
you can do the following:

  1. create new group field in the table on the Datasource tables tab and fill it.

    Here is a sample:
    ID | age | age_group

    1 | 18 | 1

    2 | 26 | 2

    3 | 31 | 3

    4 | 20 | 1


2. use this age_group field in the SQL query:

select count(ID),

age_group

from TableName

group by age_group