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.
How simple(?) would it be to implement into the birthday mod, this idea? If it is a members birthday, I would like to have the forum automatically send a "Happy Birthday" Email or PM, possibly integrated into the admin_pop_mail.asp (Email All Users Mod).<
آخرین ویرایش توسط
نوشته شده در
Ok. I have kind of been looking into this a little bit. I am trying to implement an add-on to the "Email All Users Mod". I have added selections to this mod before so I know how to do it, but this one is throwing a wrench in the works for me. Here is where I have gotten so far.
In the table "FORUM_MEMBERS" the field "M_DOB" looks like it is stored as a string in the form of "yyyymmdd". To admin_pop_mail.asp ("Email All Users") I have added the following to my SQL statement:
I added a response.write strSql above the :
, to ensure it was converting the date correctly to a string and in the same format as it is stored in DB (Access). However, when I try to send an email to the "Case 4" Members (test), I get this error:
Any ideas here? The SQL looks good and the output of the Response.Write looks good too? What else could it be really? Knowing me, something small and stupid that I overlooked again. LOL.
<
In the table "FORUM_MEMBERS" the field "M_DOB" looks like it is stored as a string in the form of "yyyymmdd". To admin_pop_mail.asp ("Email All Users") I have added the following to my SQL statement:
Code:
if Err_Msg = "" then
'FORMAT TODAYS DATE TO MATCH THE DATABASE STRING (M_DOB)
Dim today
today = Left(DateToStr(strForumTimeAdjust),8)
'END DATE FUNCTION
strSql = "SELECT M_NAME, M_EMAIL, M_LEVEL, M_DOB"
......
Case 4
strSql = strSql & " AND M_DOB = " & today
I added a response.write strSql above the :
Code:
rsMail.Open strSql, my_Conn, 0, 1, &H0001
, to ensure it was converting the date correctly to a string and in the same format as it is stored in DB (Access). However, when I try to send an email to the "Case 4" Members (test), I get this error:
Code:
SELECT M_NAME, M_EMAIL, M_LEVEL, M_DOB
FROM FORUM_MEMBERS WHERE M_STATUS = 1
AND M_RECEIVE_EMAIL = 1 AND M_DOB = 20060731
Microsoft JET Database Engine error '80040e07'
Data type mismatch in criteria expression.
/forum/forum2/admin_pop_mail.asp, line 157
Any ideas here? The SQL looks good and the output of the Response.Write looks good too? What else could it be really? Knowing me, something small and stupid that I overlooked again. LOL.
<
نوشته شده در
Since the date is stored as a string, you'll need to put single quotes around it - otherwise it thinks you are sending it a number.<
نوشته شده در
Now I do not get any errors. Thanks very much. But now it s saying "No Members Found" ??? I set up two dummy accounts, "Test" and "Demo" and set their birthdays to today to try it out and it tells me "No Members Found". Odd.<
نوشته شده در
Hmm. Not sure about that one. You double-checked the value in the database?<
نوشته شده در
yeah...very odd, right?<
نوشته شده در
Code:
"SELECT [FIELDS] FROM MEMBERS WHERE M_DOB LIKE '%"&mid(datetostr(strforumtimeadjust),5,4)&"'"<
Search is your friend
“I was having a mildly paranoid day, mostly due to thefact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
نوشته شده در
LMAO. Oh my!!! Yeah, I guess you are correct with that observation. LOL Thanks Shaggy. LOL<
نوشته شده در
whoops.. missed that one myself!
Guess that takes care of it.
<
Guess that takes care of it.
نوشته شده در
Is there a mod released for this one? =)
<
<
/Tribaliztic
- www.gotlandrace.se -
- www.gotlandrace.se -
Email Member
Message Member
Post Moderation
بارگزاری فایل
If you're having problems uploading, try choosing a smaller image.
پیشنمایش مطلب
Send Topic
Loading...