Count the number of unique data in a table

-1

I have a table in a database that holds the name of each user who accessed my application in PHP. I would like to do a function that calculates the number of unique users who have accessed it so far (assuming a user can access it more than once). However, I have no idea how to do this count.

    
asked by anonymous 05.09.2015 / 15:36

1 answer

0

I discovered that there is a command in SQL that does this

SELECT COUNT(DISTINCT 'column_name') FROM 'table_name'
    
05.09.2015 / 15:45