On Fri, 28 Aug 2009 19:50:56 +0200, Alejandro Ruiz-Oriol <aruiz...@itelsys.com> wrote:
>Thank's Swithun > >but I still have trouble. > >Ok, I find out how to register functions with >PDO_Sqlite extensions. Just in case someone >is in the same situation, the way to do it is this: > >$dbh = new PDO('sqlite:/whatever.sqlite'); >$dbh->sqliteCreateFunction('Test','Test'); > >But I still have a problem: > >If I use direct the test funcion in a quuery like > >$res=$dbh->query("select test() from table"); > >it works, but if function test is invoked from a triiger it will say, my >sentence will be somethin like > >$modulo=$dbh->query("UPDATE test SET x = 1"); > >I get this: > > [0] => HY000 > [1] => 1 > [2] => no such function: Test > >seems like the trigger is not using the same "$dbh" > >¿any clue? Are you sure the function is registered on the $dbh with $dbh->sqliteCreateFunction(...); on the $dbh in which the trigger fires? You have to do that in every script that instantiates the object. >Thx -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users