This is what i can imagine about the PM system:
table name : message
col 1 : username - store the username who will receive the mesage on col "message"
col 2 : message - Store the message
col 3 : read - default value is 0,if the user click on the message ,turn this value to 1,means that it isn`t a unread message anymore.
col 4 : time - store the date and time of the message
col 5 : sender - store the sender`s name
col 6 : subject - store the subject of the message.
See? you dont need any ID in this script,all u need is make a simple query like ("SELECT * From message WHERE username="'.$name_of_the_receiver."' ")
You can also sort those messages by date,sender,ect...
P.S:If the username haev an ID,i suggest you use ID instead of uing username
