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 NO BUG chkForumModerator
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redbrad0
Advanced Member

USA
3725 Posts

Posted - 01 August 2001 :  13:30:34  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
why is mo and me in these files? shouldn't it be looking at " & strTablePrefix & " or " & strMemberTablePrefix & "


function chkForumModerator(fForum_ID, fMember_Name)
'## Forum_SQL
strSql = "SELECT mo.FORUM_ID "
strSql = strSql & " FROM " & strTablePrefix & "MODERATOR mo, " & strTablePrefix & "MEMBERS me "
strSql = strSql & " WHERE mo.FORUM_ID = " & fForum_ID & " "
strSql = strSql & " AND mo.MEMBER_ID = me.MEMBER_ID "

if strAuthType = "db" then
strSql = strSql & " AND me.M_NAME = '" & fMember_Name & "'"
elseif strAuthType = "nt" then
strSql = strSql & " AND humm.M_USERNAME = '" & fMember_Name & "'"
end if

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

if rsChk.bof or rsChk.eof then
chkForumModerator = "0"
else
chkForumModerator = "1"
end if
rsChk.close
set rsChk = nothing
end function




Brad

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 01 August 2001 :  17:49:46  Show Profile  Visit HuwR's Homepage
No, mo and me are called table aliases and are set here

FROM " & strTablePrefix & "MODERATOR mo, " & strTablePrefix & "MEMBERS me "

you can then reference the tables using the alias instead of the fullname.

it is perfectly normal to do things this way

Go to Top of Page
  Previous Topic Topic Next Topic  
 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.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07