Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

find logged in users mysql

SELECT SUBSTRING_INDEX(host, ':', 1) AS host_short,
       GROUP_CONCAT(DISTINCT user) AS users,
       COUNT(*) AS threads
FROM information_schema.processlist
GROUP BY host_short
ORDER BY COUNT(*), host_short;
Source by www.techonthenet.com #
 
PREVIOUS NEXT
Tagged: #find #logged #users #mysql
ADD COMMENT
Topic
Name
6+2 =