mercredi 27 avril 2016

php UDF function doesn't work from trigger SQlite database

I have UDF (user defined function) exec_script(), which create file on disc (win7).

I registered it:
$db = new SQlite3('name.db');
$db->createfunction('exec_script','exec_script');

If I call the udf in this way:
$db->querySingle('SELECT exec_script()');

the function executed right.

But then I try to call it from the trigger, nothing happens. And I haven't message like this "no such function: exec_script()" too. It means that the function is call, but doesn't work.

SQlite trigger's code is
create trigger callfunc BEFORE UPDATE OF status ON cases
FOR EACH ROW
BEGIN
SELECT exec_script();
END

How can I check the trigger? Thanks

Aucun commentaire:

Enregistrer un commentaire