Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By marcosfpa
#824893
How to know if executeQuery gave error?

For example: I need to put a control where when a executeQuery ($ sql, $ db) can not connect to the database I can somehow store a warning in a variable. How to make?
#824921
You can create another trigger with this code:
Code: Select all
@@errorMessage = @@__ERROR__;
Set this trigger to fire after your other trigger which executes executeQuery().

If you want to display this in a Dynaform, then create a text field in Dynaform associated with the "errorMessage" variable.
#824960
I don't have time to test this, but try this:
Code: Select all
if (!empty(@@__ERROR__)) {
   throw new Exception(@@__ERROR__);
} 
If that doesn't work, then try this:
Code: Select all
if (!empty(@@__ERROR__)) {
   $g = new G();
   $g->SendMessageText(@@__ERROR__, "ERROR");
   unset(@@__ERROR);
}
If neither work, then the only solution is to display the error in a later Dynaform.

Hi, Is there any way to hide my custom column whi[…]

Send for clarification

Hi, I know this is an old post but i could not fin[…]

add dropdown to search process

Please replay if there is any solution!!!!

Amosbatto, PMUsers.com is down.

Hi Amos, I appreciate you setting up a tips and t[…]