How do I make such a complicated demand (for me)on mysql and php
| From: | mailing | Date: | Thu, 01 May 2003 23:24:34 +0000 |
| Subject: | How do I make such a complicated demand (for me)on mysql and php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-146009@lists.php.net to get a copy of this message | ||
Hi
Okay... I am out of my depth and confused and would appreciate some help to push me in the right
direction.
I have 3 tables in MYSQL:
"users" - contains users email address and the press release categories that they wish to
hear about (in usr_4).
"releases" - contains press releases with a datstamp in (Ymd) format and presscatid
categories - which has all the press release categories and presscatid
What I want to do is send all users that have asked to receive daily updates of chosen categories
the title, first 150 characters and the link back to the release, an email of the preferences that
they have chosen (eg Food, Transport etc), if there is a new release in that category.
I have so far managed to get the releases with a datestamp of $today and send it to my email address
(hardcoded in the script)
I can not work out how to get the script to step through all the press release categories on by one
and which logic is needed. Do I select the cateorgies and start that end or do I select the users
and the work through the categories that they have requested to hear about?
Many thanks
James