[eluser]Unknown[/eluser]
CREATE TABLE `sb_mail` (
`id` int(9) NOT NULL auto_increment,
`user_id` varchar(11) NOT NULL default '0',
`authoruser_id` varchar(11) NOT NULL default '0',
`convo_id` int(9) NOT NULL default '0',
`maildate` int(14) NOT NULL default '0',
`subject` varchar(50) NOT NULL default '',
`body` text,
`status` int(1) NOT NULL default '0',
`outbox` int(1) NOT NULL default '0',
PRIMARY KEY (`mail_id`),
KEY `INDEX` (`mail_user_id`)
)
in this status can have 0,1,2 indicating 1: unread mail in mailbox,0: read mail,2: mail deleted from inbox
outboz would be having 2 value 0,1
1 indicating mail in outbox and 0 indicating mail in outbox deleted
whenever user would be deleting from outbox you would check if message has status 2 than you will delete message else you would change outbox value to 0 for that message , in same manner value of status would be maintained