Posted on 2006-10-28
Seems that i need your Expert Opinion on this.
I want to create a function that will mail to users acording some results.
Let me explain a bit more what i want....
Im bulding a site where registered users can upload images and infos about each picture lets name it user_photos with many fields that holding infos about each picture.
I want to create a table, lets name it fav_user , where users will add some keywords in the fav_key field .
Lets say that the user1 add in fav_key the words...fish,shark,turtle...etc..
Later another user , user2, he is uploading 1 image with the word fish...
And another, user3, uploading some other images with the word shark...
I need a way to search in the user_photos table using the fav_key as keywords and later to mail in user1 that there are 2 new pictures in my site that contain the selected keywords fish and shark.
The problem is that ..
1)I want to send to user1 only 1 e-mail with the 2 results iv found and NOT 2 mails(one for each result)..and
2) if a 3rd user upload later another picture that contain one of the users1 keywords to mail again user1 that 1 NEW picture is ready for him .
So far i can understand right that means that somehow i must keep log of the sended e-mails in order to Avoid to send the same infos to user1 more than once.
Can you pls tell me how must be the structure of my tables in my database?
And a general idea on how i can do what i want.
I hope that i explained well enough what i want to do.
Thnx in advance for your help...