On Tue, Jan 31, 2012 at 6:35 PM, Ron Piggott
> Hi Everyone.
> I manage an e-mail list. I am trying to add a new function into it:
> suspensions. The idea is that someone wouldn’t have to unsubscribe. Instead
> there would be a record of their suspension in the table
> member_subscription_suspensions and their account wouldn’t be included as a
> database query result when sending out the daily e-mail.
> There are three tables: Profile of the subscriber, subscriptions and
> subscription suspensions:
> How do I change this query to exclude any one who has a suspension record for
> “today”. IE CURDATE()
> Thanks for your help. Ron
> Ron Piggott
I'm not sure why you posted your question here, it has no relation to
PHP whatsoever. And while you're not specifically asking, you cannot
assume people will start to write SQL for you.
It would've made sense if you mentioned what database you're using.
Some databases support the EXCEPT operator in SQL, though it seems
that the most popular one, MySQL, does not support it.
You can achieve the same with LEFT JOIN. Wikipedia has an example
on how to replace the EXCEPT operator on databases that don't support
Hope this will help you get started.
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php