Page 1 of 1

About Moving deleted messages to trash

Posted: Fri Sep 12, 2008 3:24 am
by anushal
hai....can u please help me out

How can i fetch the deleted messages and display them in a trash page.

Thanku in advance

Re: About Moving deleted messages to trash

Posted: Fri Sep 12, 2008 4:48 am
by Stryks
How did you go with your last post? That code help at all?

As for how to do this, I think I'd probably just add another field in the messages table named 'deleted'. Just a boolean, or a 1 length tinyint that you'll set to either 1 or 0. When the user hits delete as per the previous post, just set the 'deleted' column to true or 1, depending on what method you want to go with.

Then when you display messages, show only messages where deleted = false. You could create a trash view by showing messages where deleted = true. And you could 'empty' the trash by saying delete where deleted=true.

Hope that helps.

Cheers

Re: About Moving deleted messages to trash

Posted: Fri Sep 12, 2008 7:21 am
by anushal
hi....in the last code there was a small variable missing in the delete file..i verified that n got out with the output.