I'm trying to create a messaging system for my site the tables in the Mysql DB looks like this:
PM_HEAD
PM_HEAD_ID (Primary key,AI,INT)
PM_SUBJECT (VARCHAR)
PM_TO (VARCHAR)
PM_FROM (VARCHAR)
.
PM_ROWS
PM_HEAD_ID (INT, FK)
PM_ROWS_ID (INT,Primary key,AI)
PM_MESSAGE (TEXT)
PM_DATE (DATETIME)
PM_FROM (VARCHAR)
PM_TO (VARCHAR)
How do i create my PDO query for inserting on a new message? i've tried a couple of joins, but after reading up on it abit it seems that mysql dont support insert with join?
I need some advice on how i should proceed when a user messages another for the first time, a reply wont be such a hazzle...