0

i have emailing-list(based on some params) being automatically updated from an existing query. I explain : I have an emailing list (containing only email addresses) called "new users list" that will automaticcaly be updated whenever there are new users. I assume this is going to be done by a query stocked somewhere!

Any ideas?

ProXamer
  • 377
  • 1
  • 9
  • 25

2 Answers2

1

Actually what is your question. is it how emailing list is being updated?. if your question is how that emailing list is being updated than it can be a trigger on the table where new users being register.

Ajay
  • 154
  • 1
  • 11
  • but sometimes i need a list that is updated based on several tables and parameters! what do you think of a procedure ? – ProXamer Mar 16 '12 at 11:45
  • i think you should create triggers on every table. which you used to generate your Emailing List Table. – Ajay Mar 19 '12 at 06:07
1

Add a postInsert() listener in your User model to automatically insert the new user's email to the email addresses whenever a new user is added.

qais
  • 1,808
  • 3
  • 20
  • 31
  • thanks Qais, actually what you said works, but only in this case(new users).Unfortunatelly there are more complex lists (such as "users that have more than 2 rented cars", "users with more thant 10 comments per day") you see? – ProXamer Mar 19 '12 at 09:15