1
I'm developping an integrated chat with private messages, anyway, I need to delete ALL my private messages. I'm using this code:
$pm_handler =& xoops_gethandler('privmessage');
for ($i = 0; $i < $total_messages; $i++) {
echo ""
.$pm_arr[$i]->getVar("msg_id")."";
$pm =& $pm_handler->get($pm_arr[$i]->getVar("msg_id"));
echo ""
.$pm->getVar("msg_id")."";
$pm_handler->delete($pm);
unset($pm);
}
$total_messages is the messages count, I'm getting an exit like that:
your messages are...
[werem]: HI!!
[alise]: Hello WEREM!!
testing deletion
1
1
2
2
But wont do the job, It's posible to delete ALL the private messages doing a GET?
Thanks in advance!!!