Jump to content


Photo

PM system


  • Please log in to reply
9 replies to this topic

#1 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 10 October 2006 - 10:00 PM

I'm about to start making a PM system for my website

Before I do, just wondering if anyone has any tips or things to concidered before creating the database structure

To put it simply, Every message sent by a user goes into the 1 table. The way a user gets their own messages is query the database for rows that match their User ID

is that the best way?
I would love to change the world, but they won't give me the source code

SEO Agency

#2 fenway

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

Posted 10 October 2006 - 10:11 PM

What about multiple recipients, and replies?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 10 October 2006 - 10:31 PM

replies would be sent into the same table

send = senders ID
to = to ID

That would be logical right?
I would love to change the world, but they won't give me the source code

SEO Agency

#4 fenway

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

Posted 11 October 2006 - 07:47 PM

Sure, I guess... so you wouldn't handle multiple toIDs separately?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 12 October 2006 - 02:07 AM

I dont get what you mean?

Like a mass mail?
I would love to change the world, but they won't give me the source code

SEO Agency

#6 fenway

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

Posted 12 October 2006 - 03:30 PM

I mean that if I PM someone, and copy another 6 people, how would this be represented? Or would you system simply not support this?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#7 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 12 October 2006 - 09:52 PM

I wouldnt allow normal users to send out mass mails, But I am going to have it allowed for admin
I would love to change the world, but they won't give me the source code

SEO Agency

#8 fenway

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

Posted 12 October 2006 - 09:56 PM

No, I meant how do you plan to represent this in the DB?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#9 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 12 October 2006 - 10:05 PM

Oh. Well, im not going to allow 'carbon copying' messages for anyone..

However, I will have a mass PM for admin. Obviously it would be pointless having the same message in x amount of rows for each member

So, I was going to set the QUERY to look for all rows which have the TO field matching their username, aswell as querying for any FROM rows that contain 'admin'

In other words, the query searches for matches to their username and messages from Admin

Sound the logic?

Here is the Structure

ID
TO
FROM
DATE
MESSAGE
IP
ATTATCH

Any suggestions for another field I may want to include?
I would love to change the world, but they won't give me the source code

SEO Agency

#10 fenway

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

Posted 12 October 2006 - 10:59 PM

That makes sense.
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