Custom Events Doesn't Work at all

QuestionsCustom Events Doesn't Work at all
Steve asked 5 years ago

 

 

 

I add below code to update the master table.  But It doesn’t work at all.

Please give me a guide.

 

 

$e[“on_after_update”] = array(“update_master”, null, true);

function update_master($data)
{
// you can also use grid object to execute sql, useful in non-mysql driver

global $grid;

$str = “update DPLSchedule as m
set UpCN51 = (select count(HHT) from DPLmigration as d where d.pid=m.id and d.MgStatus = ‘SUCCESS’ AND d.HHT = ‘CN51’),
UpCT40 = (select count(HHT) from DPLmigration as d where d.pid=m.id and d.MgStatus = ‘SUCCESS’ AND d.HHT = ‘CT40’)
where m.id = {$data[“pid”]}”;

$grid->execute_query($str);
}

 

2 Answers
Abu Ghufran Staff answered 5 years ago

Please share complete code for review. This code segment does not show any issue.

You can either email me or share link by uploading code here: https://gist.github.com/

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Steve answered 5 years ago

Thank you.  I’ve changed my mind not to use this function. I am going to use the custom button on the toolbar with the user-defined function.  But I don’t know how to do that.

I added new button to the top toolbar.  But I can’t call my function when the button is pressed.  That is why I asked you How to add the user defined button at the top toolbar. 

 

 

Your Answer

13 + 7 =

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?