Reputation: 5762
In my table of users I have column with name "query" which means how many times user press SEARCH button.
So for example I have:
login | query | company
user1 | 40 | 1
user2 | 60 | 1
user3 | 30 | 2
What I try is to get number of queries of all users in one company. I already tried something like:
$sql = "SELECT count(*) as total_count FROM users WHERE company = :company";
But this just gives me the number of people from one company and I'm not sure how can I edit it to count all queries together.
Upvotes: 1
Views: 55