{
switch($this->event_id) {
case -1:
- return 'DELIVERED';
+ return 'DELIVERED'; //not valid..
case 0:
return 'PENDING';
default:
switch ($q['query']['status']) {
case 'SUCCESS';
- $this->whereAdd("event_id < 0");
+ $this->whereAdd("msg_id != ''");
break;
case 'FAILED';
- $this->whereAdd('event_id > 0 AND act_when <= NOW() ');
+
+ $this->whereAdd('msg_id = '' AND event_id > 0 ');
break;
case 'PENDING';