2 Posts
mtf
4 years ago
3
Topic

Hello Forum
I wrote a database using Seblod data.
These data I would like to count us now output. As a beginning I don't find an approach how to solve this.

Name| date1| date2| date3
Max | yes | no | yes
John | no | yes | no
Peter| yes | yes | no

Now I want to count the number yes in date1. Next the number yes in date2 and also for date3.
This result should then be displayed in the frontent
Totally count:
date1| date2 |date3
2 | 2 |1

For your help I thank you already!
The beginner ;-)

Get a VIP membership
1283 Posts
Bucklash
4 years ago
0
Level 1

sql query could be like this:

 SELECT COUNT(date1)FROM #__cck_store_form_mytable;

and put this in field from sql pack, and have it in the list view. 

mysql count();

sql pack

Post your sql query here, maybe someone can halo with that

1283 Posts
Bucklash
4 years ago
1
Level 1

Also if do not want to pay for extensions, do an override on item view, and insert sql query using php. 

count-

2 Posts
mtf
4 years ago
0
Level 2

Hello Bucklash

I bought the SQL module and it works fine.

Many thanks

Get a VIP membership