1
WEREM
Delete ALL my private messages
  • 2005/7/23 5:15

  • WEREM

  • Just popping in

  • Posts: 12

  • Since: 2005/3/12


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!!!

Login

Who's Online

257 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 257


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits