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

schedlued

New Here ,
Feb 26, 2007 Feb 26, 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 date.

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?

should i have a daily and weekly column in my table where the date, time and message is stored

hope someone can help
TOPICS
Advanced techniques

Views

310

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 ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

I'd have a frequency table myself with a frequency_id in your existing table.

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 ,
Feb 26, 2007 Feb 26, 2007

Copy link to clipboard

Copied

ok Dan thanks, thats sounds good

how does the frequency table work? ie what fields and how would i add to my code to use this

Many thanks

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
LEGEND ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

If it was my app, and it's not, the freqency table would have either two or three fields. It might be

frequency_id pk
minutes integer

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

in fact, the time_unit field might be an id field with a foreign key relationship to a time_unit table.

To the table that has your user information, add a frequency_id field.

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 ,
Feb 27, 2007 Feb 27, 2007

Copy link to clipboard

Copied

LATEST
ok 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

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