hai....can u please help me out
How can i fetch the deleted messages and display them in a trash page.
Thanku in advance
About Moving deleted messages to trash
Moderator: General Moderators
Re: About Moving deleted messages to trash
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
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
hi....in the last code there was a small variable missing in the delete file..i verified that n got out with the output.