Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]

What's SAP FICO?

Trustworthy and skill-building, each of these actu[…]