Find Duplicate Members - Posted (6771 Views)
New Member
garyrobar
Posts: 90
90
Wrote a quick script to more easily point out duplicate posters (BY IP ADDRESS)

Just replace part with your own conn string, and your own url...(in caps lock below) This is meant to be saved as it's own page.

You get a print out of any members with an IP address that another member also has. It orders by IP address, so you can easily see what members are creating mults.

I typically delete the duplicates that have no posts. Sometime I'll move all posts under the oldest account for the same person.
Code:

<table border-collapse="separate" style="border:1px solid #D8D8D8;" cellpadding="9" cellspacing="1">
<tr>
<td valign="top" class="border" align="left">
<div class="title" style="text-align: left;">Find Duplicate Member Profiles</div>

<p>This table shows the contents of the url fields in the user profiles.</p>
<table cellpadding="3" class="stattable" style="border-collapse: collapse;">
<tr bgcolor="#e0e0e0">
<td align="center">Member ID</td>
<td align="center">Posts</td>
<td align="center">Member Name</td>
<td align="center">IP Address</td>
<td align="center">Email</td>
</tr>
<%
dim gfn, grs, gSQL


Set gfn = Server.CreateObject("ADODB.Connection")
gfn.Open [#########YOUR CONN STRING#########] Set grs = Server.CreateObject("ADODB.RecordSet")

gSQL = "select member_id, m_posts, m_name, m_ip, m_email from forum_members order by m_ip"

grs.Open gSQL, gfn, adOpenStatic

if grs.eof then
response.write "<tr><td> -na- </td><td>0</td><td>0</td></tr>"
else

thisloop = "5555555555"
lastloop = "8888888888"

do while not grs.eof
i=i+1
lastloop = currentloop
currentloop = grs("m_ip")
outputlast = output

'put current row in the variable
output = "<tr><td><a target=""_new"" href=""http://www.YOURURL.TLD/forum/pop_profile.asp?mode=display&id=" & grs("member_id") & """>" & grs("member_id") & "</a></td><td>" & grs("m_posts") & "</td><td>" & grs("m_name") & "</td><td>" & grs("m_ip") & "</td><td>" & grs("m_email") & "</td></tr>"


if currentloop = lastloop then
if flag = 1 then '---is a subsequent - so only print curr row
response.write output
else
response.write outputlast
response.write output
end if
flag = 1
else
flag = 0
end if

grs.movenext

loop
end if

grs.Close
Set grs = Nothing
gfn.Close
Set gfn= Nothing
Set gSQL = Nothing
%>
</table>
<%
response.write "<p>There were " & i & " total duplicates found in the table.</p>"
%>
</td>
</tr>
</table>

<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
New Member
MikeB.Lynn
Posts: 54
54
I get this:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/testdupmem.asp, line 4

dim gfn, grs, gSQLSet gfn
-------------------------^
Posted
Forum Admin
HuwR
Posts: 20611
20611
that bit of code should be on two line

dim gfn, grs, gSQL
Set gfn

recheck your code against what was posted in the topic
Posted
New Member
MikeB.Lynn
Posts: 54
54
When I use the path to my db file:
gfn.Open[/forum/fpdb/snitz_forums_2000.mdb]

I get this:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/forum/testdupmem.asp, line 18
Posted
New Member
MikeB.Lynn
Posts: 54
54
Never mind I just got it. Sorry
Posted
Junior Member
Giumer
Posts: 163
163
hi mate plz i ,am have 3 accaunts and me forum and ip is equal but if I go to see it doesn't visualize them to me it tells only me the total one of the ips, my database and in MSQL. me look only this

Find Duplicate Member IP Addresses:

This table shows the contents of the IP Address in the user profiles that are duplicates.
Member ID Posts Member Name IP Address Email

There are a total of 26 IP Addresses found in the Database.
thx for help
=======================
http://www.Giumer.it/forum

=======================
Posted
New Member
garyrobar
Posts: 90
90
show me the SQL code you are using...I'll fix and send back...
You Must enter a message