Jump to content


Photo

sql query format


  • Please log in to reply
2 replies to this topic

#1 markbett

markbett
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 19 September 2006 - 04:36 PM

I am strugling with how to properly write this sql query.  I have 2 tables

users and anti_spam

I need to select the email address of all users who have not unsubscribed... antispam has columns id email_address, events, newsletter, invitations, news.... so if a column is marked then the email address in question has unsubscribed so basically its is a query where i say join on email addresses where newsletter = '0'

is that right? Im not too good with complex sql queries...

#2 markbett

markbett
  • Members
  • PipPipPip
  • Advanced Member
  • 133 posts

Posted 19 September 2006 - 04:49 PM

oh and for clarification there are email addresses that will appear in the anti_spam database table that will not be in the users table.....

#3 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 20 September 2006 - 09:57 AM

Does the anti-spam table not contain a user_id?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users