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 DEV-Group
 DEV Bug Reports (Closed)
 V33(.03) BUG+FIX: ReadLastHereDate function
 Forum Locked  Topic Locked
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 01 December 2001 :  18:24:06  Show Profile
ok, here is what the function looks like now:

function ReadLastHereDate(UserName)

dim rs_date
dim strSql

' if UserName = "" then
' exit function
' end if

' if not isDate(strForumTimeAdjust) then
' strForumTimeAdjust = strToDate(strForumTimeAdjust)
' end if

'## Forum_SQL
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS."&Strdbntsqlname&" = '" & ChkString(UserName, "SQLString") & "' "

Set rs_date = Server.CreateObject("ADODB.Recordset")
rs_date.open strSql, my_Conn

if (rs_date.BOF and rs_date.EOF) then
ReadLastHereDate = DateToStr(DateAdd("d",-10,strForumTimeAdjust))
else
if rs_date("M_LASTHEREDATE") = "" or IsNull(rs_date("M_LASTHEREDATE")) then
ReadLastHereDate = DateToStr(DateAdd("d",-10,strForumTimeAdjust))
else
ReadLastHereDate = rs_date("M_LASTHEREDATE")
end if
end if

rs_date.close
set rs_date = nothing

'## Forum_SQL - Do DB Update
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " SET M_LASTHEREDATE = '" & DateToStr(strForumTimeAdjust) & "'"
strSql = strSql & ", M_LAST_IP = '" & Request.ServerVariables("REMOTE_ADDR") & "'"
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS." & strDBNTSQLName & " = '" & ChkString(UserName, "SQLString") & "' "

my_conn.Execute (strSql)

end function



fixed in v3.3.04
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 Forum Locked  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