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

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Membership Database Export Mod?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

attafox
Starting Member

2 Posts

Posted - 02 June 2006 :  13:42:40  Show Profile  Reply with Quote
Is there a mod for exporting all the fields in the membership database for reporting and outside tracking? Right now, we're doing this manually and it really gets painful if you don't keep up with it.<

AnonJr
Moderator

United States
5768 Posts

Posted - 02 June 2006 :  13:57:15  Show Profile  Visit AnonJr's Homepage  Reply with Quote
There isn't one that I know of, but if you're reasonably skilled in ASP you could write a page to generate the reports you needed as an Excel spreadsheet, Word document, or any other of a variety of formats.

Just out of curiosity, what are you trying to track and report?<
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 02 June 2006 :  16:05:36  Show Profile  Reply with Quote
attafox,

Here is a quick and dirty solution for you. It is based on code I use to export vaious database fields for tracking purposes.

Copy the following code (between the bars) to a file with an asp extension (in your forum directory).


<%

%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<!--#INCLUDE FILE="inc_sha256.asp" -->
<!--#INCLUDE FILE="inc_header.asp" -->
<%

dim strFilename
dim writestat
dim strDate
dim strColumns
strFilename = "<filepath>\members.txt"
strDate = Date & "; " & FormatDateTime(Now,4) & vbnewline
strColumns = "Member ID; Member Name; Member Level" & vbnewline

dim strNames
strNames = strDate & strColumns
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_LEVEL " & _
"FROM " & strTablePrefix & "MEMBERS ME "
set rsAM = my_conn.execute (strSql)
if rsAM.EOF or rsAM.BOF then
else
do until rsAM.EOF
strNames = strNames & " " & rsAM("MEMBER_ID") & "; " rsAM("M_NAME") & "; " & rsAM("M_LEVEL") & vbnewline
rsAM.movenext
loop
rsAM.close
set rsAM = nothing
end if

writestat = WriteToFile(strFilename, strNames, true)

Response.Write "<b>Outputing Member Details<p> File saved to: <br>" & strFilename & " </b>"

function WriteToFile(FileName, Contents, Append)
on error resume next

if Append = true then
iMode = 8
else
iMode = 2
end if
set oFs = server.createobject("Scripting.FileSystemObject")
set oTextFile = oFs.OpenTextFile(FileName, iMode, True)
oTextFile.Write Contents
oTextFile.Close
set oTextFile = nothing
set oFS = nothing

end function

%>


Be sure to change the path to a valid path on your server where you can write the file. Also, you may want to modify the data fields exported.

The semicoln delimited output will be appended to the text file each time the asp page is loaded. The output file can be opened in a spreadsheet program like excel to see the data in a column format.

Hope this helps.<
Go to Top of Page

attafox
Starting Member

2 Posts

Posted - 02 June 2006 :  17:03:33  Show Profile  Reply with Quote
Our ISP has crashed on occasion and even though they reassure us of continual backups, we have lost the entire membership on a few occasions. We also get duplicate sign-ins which we don't allow and it's much easier to catch identical IP addresses externally.<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 02 June 2006 :  17:34:02  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Ahhh. As for the duplicate sign-ins, why not just enable the 'require unique e-mail address' option? It should at least cut down on it....

As to your other dilemma, what type of database are you using?<
Go to Top of Page

Pull My Finger
Starting Member

43 Posts

Posted - 07 June 2006 :  00:23:02  Show Profile  Reply with Quote
quote:
Originally posted by attafox

Our ISP has crashed on occasion and even though they reassure us of continual backups, we have lost the entire membership on a few occasions.

I make it a point not to trust something in someone else's hands! That's why I make it a point to do a "FULL Site Backup" once a month and a "database backup" once a week!
That way all the files are in my hands and not someone else's!<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07