I would like to form a query that selects all rows that contains duplicate ids.
how can I write it?
$query = "SELECT id, count(id) as c FROM table WHERE c>1 GROUP BY id";
I get this error message when I try that.
#1054 - Unknown column 'c' in 'where clause'
I figured it out...
I had to use this query
SELECT uID , count(uID )as c FROM profile_text GROUP BY uID HAVING c >1