stuck in a jam here, would like to try to find a answer before doing a work around.
Want to Count number for Selected Field in a Table if its filled
return how many are not empty.
my table would look like this:
Table Name: EXAMPLE
Inserted 1
event_id: 1
child_1: joe
child_2: sam
child_3:
child_4
etc...child_25
child_age_1:12
child_age_2:3
child_age_3:6
child_age_4
etc...child_age_25
extra_field
other_field
etc...
Inserted 2
event_id : 2
child_1: Jack
child_2: Lue
child_3: sam
child_4
etc...child_25
child_age_1:12
child_age_2:13
child_age_3:14
child_age_4
etc...child_age_25
extra_field
other_field
other..
How to count Number of Child_# IF NOT empty? $count++ for each differnt Inserted record.
i tryed using a while and mysql_fetch_array but that would return each row..
want to make a page that shows a quick over view of how many flled and if not filed dont count.
want the output to be:
event 1:
number of child attending: 2
event 2:
number of child attending: 3
any help would be grate!