Send email on_delete

QuestionsSend email on_delete
David asked 7 years ago

Is there a way I cand send an email when I delete a record from db? I mean I want to show what was erased, actually I can send the email but empty

$e["on_after_insert"] = array("manda_correo", null, true);
$e["on_delete"] = array("correo_borrado", null, true);

$g->set_events($e);

"some part of the emaail"
<td class='columnas_importantes'>{$data["params"]["id_supervisor"]}</td>

btw when I insert a record the email shows the values inserted

1 Answers
Abu Ghufran answered 7 years ago

Hi,

In on_delete, you can first fetch record based on ID on row and send in email. The actual delete query is executed after this function.

Inside callback, you can call …
global $grid;
$rs = $grid->get_one("SQL QUERY WHERE ID=".$data["params"]["id_supervisor"]);

where $grid is jqgrid() object and $rs will have data in array format.

Your Answer

19 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?