mfyvie |
06-02-2007 12:31 PM |
Here is a query that will allow you to quickly identify existing users on your board that have the same avatars as others.
If you don't know how to run an SQL query, in your admincp go to Maintenance -> Execute SQL Query, then copy and paste the query below:
Code:
/*
This query will return a list of all of those users on your board who share an avatar with
at least one other person. This will allow you to contact them, edit them, or do whatever
you like with the information.
If this query doesn't work, you may be using prefixes in front of your table names. In this
case you'll have to edit the table names in the FROM line.
For example if your table prefix was vb then the FROM line would look like this:
FROM vbavatar av1,vbuser usr1, vbuser usr2
If you don't use table prefixes (most people), just do nothing and run this query as is
*/
SELECT distinct usr1.userid ,usr1.username, av1.title, av1.avatarid, av1.imagecategoryid
FROM avatar av1, user usr1, user usr2
WHERE av1.avatarid=usr1.avatarid
AND av1.avatarid=usr2.avatarid
AND usr1.userid <> usr2.userid
and usr1.avatarid>0
and usr2.avatarid>0
order by 4 asc
It can sometimes be interesting to see just how much you actually needed this mod :)
Note: I found that when I ran this inside the admincp it only gave me the number of rows returned. If you run it in another mysql tool you'll get the full results, including the usernames affected, etc.
|