mysql - Count columns where -


my problem in db table, amx_admins_servers columns admin_id, server_id, custom_flags , use_static_bantime, looks like

database link

and need count columns (server_id) have value of 4, 7, 10, 12 , print

server_id 4  - x times server_id 7  - x times server_id 10 - x times server_id 12 - x times 

the sample data shows 4 servers; if there other servers, though, should not shown.

any ideas?

select server_id, count(*) x_times amx_admins_servers server_id in (4, 7, 10, 12) group server_id 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -