The Forum has been Updated
The code has been upgraded to the latest .NET core version. Please check instructions in the Community Announcements about migrating your account.
I am working on a function that automatically send a new registering user a welcome PM, but I've gotten stuck somehwere in the middle
I created a file called inc_func_pm , and right now it contains the following function:
<deleted>
(Does this belong in the DEV forum?)<
<deleted>
(Does this belong in the DEV forum?)<
Last edited by Jorrit787 on 19 February 2005, 19:34
Posted
I'm having trouble getting the MEMBER_ID to send the Welcome PM to from the database. Right now the code I have is this:
Is this the right way to select the MEMBER_ID and to pass it on to PMNID (the value that determines to whom the PM is sent)
<
Code:
'### Forum SQL - Get the Member ID to send the Welcome PM to
strSql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_WPMSENT = 0 "
set rsMember = my_conn.Execute(strSql)
strPMNID = rsMember
RsMember.close
set RsMember = nothing
Last edited by Jorrit787 on 20 February 2005, 18:05
Posted
I took out that widdle pm mod out from my site so I don't know for sure if anything if this will be right but it outta be close. Two things with this sql statement which presents a problem....what happens if there is never a value of 0?!? You will get an error page that the statement is true so you need an if else statement. And the second it doesn't appear as if it is saving anything. Try something like this:
'### Forum SQL - Get the Member ID to send the Welcome PM to
strSql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_WPMSENT = 0 "
set rsMember = my_conn.Execute(strSql)
do while not rsMember.EOF
myMember = rsMember ("MEMBER_ID")
'the action you want to perform goes here
rsMember.MoveNext
loop
rsMember.close
set RsMember = nothing
Essientially this will run through the database and perform an action if a member has a value = to 0. Also be sure within the loop to update the value to 1 otherwise the loop will run forever. Again this is just an educated guess based on past sql statements I have had to write but since I don't have the mod installed anymore I can't test the theory out for you. Good luck!<
'### Forum SQL - Get the Member ID to send the Welcome PM to
strSql = "SELECT MEMBER_ID FROM " & strTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_WPMSENT = 0 "
set rsMember = my_conn.Execute(strSql)
do while not rsMember.EOF
myMember = rsMember ("MEMBER_ID")
'the action you want to perform goes here
rsMember.MoveNext
loop
rsMember.close
set RsMember = nothing
Essientially this will run through the database and perform an action if a member has a value = to 0. Also be sure within the loop to update the value to 1 otherwise the loop will run forever. Again this is just an educated guess based on past sql statements I have had to write but since I don't have the mod installed anymore I can't test the theory out for you. Good luck!<
If You Have to Ask, You Wouldn't Understand.
Posted
And the second it doesn't appear as if it is saving anything.The code above is not the whole code... I'm not that dense
I think I'm about done... I'll do some final bug-checking and then I'll post the MOD here. So far the MOD sends the new user a welcome PM and it notifies Admins of the new member's registration.<
Last edited by Jorrit787 on 20 February 2005, 18:49
Posted
This MOD is just what I needed, so was wondering if you managed to complete it?
Thanks,
Oli<
Thanks,
Oli<
Posted
*bump* ?<
Posted
Sorry to bump again, but does anyone know if this was ever continued please?
Thanks<
Thanks<
Posted
Sounds like you might be better off emailing Jorrit. Would be a very nice MOD to have available, that one.<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Bandlink Music Forums - http://www.bandlink.net/forum/
Posted
Several people have emailed me about this; I am not working on this any more.<
Posted
Hmm. Maybe you could post what you have? A lot of people would be interested in this and it's a shame that it was left in limbo after:
I think I'm about done...<
Bandlink.net - http://www.bandlink.net/
Bandlink Music Forums - http://www.bandlink.net/forum/
Bandlink Music Forums - http://www.bandlink.net/forum/
Email Member
Message Member
Post Moderation
FileUpload
If you're having problems uploading, try choosing a smaller image.
Preview post
Send Topic
Loading...