• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

weekly repeat

New Here ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

Hi i have a scheduled email system, where a user selects a time and date, which gets converted to my server time and date, and then gets put into my database with the email message,

the server then sends out emails if the time and date is less than the current server datetime.

what i need to do now is add a daily and weekly tick box to the form, but i am not sure how i should use my database to do this?

so at the min i have a table called appoint_table which has

Appt_ID (unique)
date time (message was created)
server time (if this is less than the current server time the email gets sent)


so then if i have a table called freqency_table with

frequency_id
every integer
time_unit text (week, minute, hour, etc)

what would every integer be?

and how would i link this to my appoint_table

many thanks for all your help
TOPICS
Advanced techniques

Views

234

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

frequency_id every time_until
1 1 day
2 1 week

join to your appointment table with the frequency_id

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2007 Mar 01, 2007

Copy link to clipboard

Copied

LATEST
ok many thanks

so say i have in my appoint_table i have

Appt_ID = 12
date time = 12/02/2007 12:30:00
server time = 12/02/2007 12:30:00

then my freqency_table has

frequency_id = 12
every integer = ?
time_unit text = week

how would i change the code below to send out the email if Appt_ID = 12 needs to be sent out every week at the same time as the server time = 12/02/2007 12:30:00. if that makes sence?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation