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 MOD-Group
 MOD Add-On Forum (W/O Code)
 Birthday MOD - Automatically send email on B-Day?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JBaldwin
Junior Member

USA
137 Posts

Posted - 30 July 2006 :  07:40:04  Show Profile  Reply with Quote
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).<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News



Edited by - JBaldwin on 30 July 2006 10:04:54

JBaldwin
Junior Member

USA
137 Posts

Posted - 31 July 2006 :  13:32:24  Show Profile  Reply with Quote
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:


	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 :


		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:


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.

<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 31 July 2006 :  14:48:00  Show Profile  Visit AnonJr's Homepage  Reply with Quote
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.<
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 31 July 2006 :  15:33:00  Show Profile  Reply with Quote
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.<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 August 2006 :  07:41:35  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Hmm. Not sure about that one. You double-checked the value in the database?<
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 01 August 2006 :  10:32:42  Show Profile  Reply with Quote
yeah...very odd, right?<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 01 August 2006 :  10:37:46  Show Profile  Reply with Quote
"SELECT [FIELDS] FROM MEMBERS WHERE M_DOB LIKE '%"&mid(datetostr(strforumtimeadjust),5,4)&"'"
Unless any of your members were born today, which I ver much doubt, you're not going to get any members doing it the way you currently are.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

JBaldwin
Junior Member

USA
137 Posts

Posted - 01 August 2006 :  12:40:32  Show Profile  Reply with Quote
LMAO. Oh my!!! Yeah, I guess you are correct with that observation. LOL Thanks Shaggy. LOL<

AbsolutelyFreerolls.com - Poker Freeroll Listings, Poker Forum and Poker News


Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 01 August 2006 :  13:28:38  Show Profile  Visit AnonJr's Homepage  Reply with Quote
whoops.. missed that one myself!

Guess that takes care of it. <
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 02 August 2006 :  05:28:08  Show Profile  Reply with Quote
You're welcome

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

tribaliztic
Senior Member

Sweden
1532 Posts

Posted - 05 January 2007 :  03:21:58  Show Profile  Visit tribaliztic's Homepage  Send tribaliztic an ICQ Message  Reply with Quote
Is there a mod released for this one? =)
<

/Tribaliztic
- www.gotlandrace.se -
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07