Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Clearing DB Records..
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 June 2008 :  03:49:22  Show Profile
Is there a simple Alternate MOD setup routine that will clear all the records in the FORUM_ACTIVE_USERS TABLE?
I would prefer to do this instead of downloading the DB, deleting the records manually and the waiting while the db uploads..
Would this work?

[ALTER]
ACTIVE_USERS
DROP#AU_IP###
[END]

or does the DROP remove the field intoto instead of its records?

thank you in advance
andy
<

Edited by - Andy Humm on 06 June 2008 03:54:49

Podge
Support Moderator

Ireland
3776 Posts

Posted - 06 June 2008 :  04:13:35  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
This is the sql if you can execute it
DELETE FROM FORUM_ACTIVE_USERS
where the table name is FORUM_ACTIVE_USERS<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 June 2008 :  04:49:03  Show Profile
Thanks for the starter
this Alternate MOD script works:

[DELETE]
ACTIVE_USERS
(MEMBER_ID)
[END]

<
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 June 2008 :  05:30:38  Show Profile
Alternatively this code can be run from admin_home.asp
1. Save this code as deleteactiveusers.asp
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Server.ScriptTimeout = 600 ' This could take a while as the code is not very efficient!
dim conn

'Set the path to the database
sourceDB = "C:\xxxx\xxxx\xxx\xxx.mdb"
response.write ("Database: " & sourceDB & "<br>")

'Delete Active Users from Table

Set conn=Server.CreateObject("ADODB.connection")
	conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & sourceDB
	Set rs = conn.Execute("DELETE * FROM FORUM_ACTIVE_USERS")
				
response.write("The <b>Active Users</b> list has been successfully deleted<br><b>Done!</b>")
%>
<br>
<font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Return to Admin Page</font> <a href="admin_home.asp"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">click here</font></a>


2. Upload file into forum directory

3. admin_home.asp approx line 144
Find:
" <p><b>Other Configuration Options and Features:</b>" & vbNewLine & _
" <UL>" & vbNewLine


immediately after that add
Response.Write " <LI><span class=""spnMessageText""><a href=""deleteactiveusers.asp"">Delete Active Users</a></LI>" & vbNewLine ' ######## Active Users Delete########
4. Upload admin_home.asp

5. Thats it.<
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 06 June 2008 :  05:40:05  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
I wonder if you set the timeout to 0 and viewed the active users page would it do the same job ?<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 06 June 2008 :  06:05:25  Show Profile  Send ruirib a Yahoo! Message
This seems quite unneeded. The timeout, as others wrote, will clean the table. Just set it to a small value.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 June 2008 :  07:03:49  Show Profile
It does and all that work.. never mind! thank you<
Go to Top of Page

Podge
Support Moderator

Ireland
3776 Posts

Posted - 06 June 2008 :  07:50:26  Show Profile  Send Podge an ICQ Message  Send Podge a Yahoo! Message
Live and learn.<

Podge.

The Hunger Site - Click to donate free food | My Blog | Snitz 3.4.05 AutoInstall (Beta!)

My Mods: CAPTCHA Mod | GateKeeper Mod
Tutorial: Enable subscriptions on your board

Warning: The post above or below may contain nuts.
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 06 June 2008 :  12:22:38  Show Profile
absolutely!<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.38 seconds. Powered By: Snitz Forums 2000 Version 3.4.07