need some ideas

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

need some ideas

Post by Yourchild »

I am creating a page where each user can sign in and check his/her email...

What is the best way to go about implementing this procedure? Obviously I cannot store all the messages sent between users in 1 table, because if 1 user delete his emails, it wont be available for the other user to view.

This is something normal that most websites have ..just sending messages to each other ...inbox, outbox etc..

question is...should i create 2 tables with identical tuples in both tables? or should i create 1 table with duplicated tuples? a tuple is a row in a DB by the way.

Any help will be gladly appreciated. Thanks!
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

First of all, will these messages be actual emails?

Secondly, what exactly are you trying to do?
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

Post by Yourchild »

This is sending messages to one another ...equivalent to me sending you a private message on this website. It is not sending actual emails.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

I would duplicate the entry in the DB: once for the user's sent items (if necessary) and one for the other user's inbox. They should each have access to only their own copy.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: need some ideas

Post by superdezign »

Yourchild wrote:What is the best way to go about implementing this procedure? Obviously I cannot store all the messages sent between users in 1 table, because if 1 user delete his emails, it wont be available for the other user to view.
That's why we always have a separate "sent messages" folder, because it is actually separate data. You should also possibly give them a choice to save it or not, since it can be deleted.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Descriptive Subjects

Post by feyd »

~Yourchild, please choose a new, more descriptive subject.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
Yourchild
Forum Newbie
Posts: 16
Joined: Mon Jul 30, 2007 3:04 pm

Post by Yourchild »

thanks for the ideas everyone. And to the moderator, I will keep the subject headers more detailed next time. thanks!
Post Reply