how read primary key in event

Questionshow read primary key in event
pierre mata asked 7 years ago

Hello Abu, how i read the primary key in on_insert, on_update, on_after_insert and on_after_update events???

in the function, i have this:

function add_client($data)
{
$id = $data["params"]["idcli"];
$nombre = $data["params"]["nombre"];
}

$nombre have value ("Carlos"), but $id(primary key) do not have any value in any events mencionated at first, WHY? don't care if the primary key is defined as id, or idcli, can't be read!!!!

thanks a lot…

2 Answers
Abu Ghufran answered 7 years ago

Inside callback, you can print whole $data array for debug.

{
phpgrid_error($data);

.}

It will print whole array as error message on grid and you can review the array elements.

Pierre Tremblay answered 7 years ago

Terrific! thanks!

Your Answer

3 + 17 =

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?