Status of viewing members ICQ field

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/61165?pagenum=1
05 November 2025, 08:08

Topic


endomorph
Status of viewing members ICQ field
25 February 2006, 11:44


I have been trying to wrap by head round this for a few days but I cannot get what I want.
I want to check if the person viewing a forum/topic is a member and has 'something' in their ICQ field.
If not, they get an error message.
Which variable is the "viewing members name/ID" variable ?
Ayy ideas Podge ? Oh great and wonderful guru ?<

 

Replies ...


OneWayMule
27 February 2006, 04:35


This should give you an idea:
Code:
If mLev > 0 Then
strSql = "SELECT M_ICQ FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & memberID
Set rsMemberICQ = my_conn.Execute(strSql)
If Not rsMemberICQ.EOF Then
strMemberICQ = rsMemberICQ("M_ICQ")
End If
rsMemberICQ.Close
Set rsMemberICQ = Nothing
If trim(strMemberICQ) = "" Then
'No ICQ value -> display error here Else
'Do something else here End If
Else
'User is not logged in, display error here End If

Let me know if you have any questions.<
endomorph
27 February 2006, 09:16


Oneway,

Thanks for that. I managed to sort it in the end.
I used -

Code:

dim rspaid
dim paidmember
dim paidcheck
dim strSqlcheck

if paidmember > 1 then
'# Do nothing
else
'# Check if paid member
set rspaid = server.CreateObject("adodb.recordset")
strSqlcheck = "SELECT M_ICQ FROM " & strMemberTablePrefix & "MEMBERS "
strSqlcheck = strSqlcheck & " WHERE M_NAME = '" & strDBNTUserName & "'"
rspaid.Open strSqlcheck, my_Conn
paidcheck = rspaid("M_ICQ")

if trim(paidcheck) = "Paid" then
paidmember = 1
else paidmember = 0
end if
rspaid.Close
set rspaid = nothing
end if

Seems to work fine but any comments on the above would be appreciated.<
© 2000-2021 Snitz™ Communications