Forum Moderators: coopster

Message Too Old, No Replies

Writing for CRON need pointers

same crontab job but undefined number of scripts

         

henry0

10:00 pm on Nov 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is my quandary
Consider the CRON part of the task at hand done! Since one of my last post I have done research on CRON and feel pretty good about it, what a power at hand!

I am trying to build even without knowing if it could be achieved as I envision it the following
I will have in an existing news site the users registering a set of keywords
If a query (triggered by cron) finds any key word then the user is emailed with a link to the article

One at a time I can figure it out

But how can my script figure that new users do have new scripts to be catered to? By querying all users and filtering where keyword is not null?
Another word how can that become a mass query

I am not looking for a script per se but for a rough scenario/scheme/direction

Regards

Henry

sun818

10:12 pm on Nov 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Here's a scenario. You have three tables:

1) user,
2) keywords, and
3) articles.

Join user table with keywords table linked by user name. Then you can join the keywords table to your articles table using the like criteria or <> Null to select articles based on the keywords. Its not efficient, but it will work.

henry0

10:16 pm on Nov 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thank you
My DB has users and keywords in a table, article is another one
however you scheme seems to be a potential way to go

henry0

12:01 am on Nov 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was reading again sun 818 answer
mostly where it says "not efficient"

can you dev on the topic
how will be the response if a query is performed every 6 hours and that for at least 1000 users

thanks

regards
Henry

sun818

12:24 am on Nov 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The field containing the article text would have to be indexed for the query to be efficient. I was thinking Memo type fields could not be indexed, but apparently I'm wrong:

[mysql.com...]

As long as you have field you are selecting the keywords from is indexed, your queries will process quicker than without.

henry0

11:38 am on Nov 18, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



OK I got it
again thank you
Henry