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.

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]

Betvisa clone scripts are pre-built software solut[…]

A Bet365 Clone Script is essentially a ready-made […]