Re: [sqlite] Problem invoking php functions from a trigger

2009-09-01 Thread Alejandro Ruiz-Oriol
Sorry I send it before time... 2009/9/2 Alejandro Ruiz-Oriol > Ok, I got it!! > > In my php functions I use this code to connect to the DB (its in an include > file) > > function OpenDB() > { > $dbh=$GLOBALS['dbh'];// Get Global Handle > if

Re: [sqlite] Problem invoking php functions from a trigger

2009-09-01 Thread Alejandro Ruiz-Oriol
// Create new handle $GLOBALS['dbh']; // Save it in globals include_once("/var/www/arduino/sqlite_functions.php"); // Include al the functions needed } return($dbh); // Devover el handle a manejar. 2009/9/1 Kees Nuyt > On Tue, 1 Sep 2009 09

Re: [sqlite] Problem invoking php functions from a trigger

2009-09-01 Thread Alejandro Ruiz-Oriol
again 2009/8/31 Kees Nuyt > On Mon, 31 Aug 2009 11:58:42 +0200, Alejandro Ruiz-Oriol > wrote: > > >I've been doing some further reading and I think that I already have the > >answer and it's "No, no way to avoid this". > > > >As far as I&#x

Re: [sqlite] Problem invoking php functions from a trigger

2009-08-31 Thread Alejandro Ruiz-Oriol
t I can use to split the table in 2 different tables). The other is to start a background php task that wait till the DB lock is released and then, tries the insert. Any suggestion? thx again 2009/8/31 Alejandro Ruiz-Oriol > Ok, you we're right!! > > The trigger fires a PHP functi

Re: [sqlite] Problem invoking php functions from a trigger

2009-08-31 Thread Alejandro Ruiz-Oriol
that SQLite considers this new connection as completely new and it's blocking the whole database. Do you think that this can be avoided somehow? Thx in advance Chano 2009/8/29 Kees Nuyt > On Fri, 28 Aug 2009 19:50:56 +0200, Alejandro Ruiz-Oriol > wrote: > > >Thank&#

Re: [sqlite] Problem invoking php functions from a trigger

2009-08-28 Thread Alejandro Ruiz-Oriol
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 proble

Re: [sqlite] Conditional triggers

2009-08-28 Thread Alejandro Ruiz-Oriol
Use old.TypeID==1 if you want the trigger to be fired when TypeID WAS 1 before the update, or new.TypeID==1 if you want the trigger to be fired when TypeID is updated to 1. Hope this help... 2009/8/28 Dennis Volodomanov > Hello all, > > Is it possible to create such an AFTER INSERT trigger that

[sqlite] Problem invoking php functions from a trigger

2009-08-28 Thread Alejandro Ruiz-Oriol
Hi everybody, I'm having a problem when I invoke a function developed in php from a trigger. I've been using SQLIteManager to develop and test my functions and everything work's perfect. I've created this function: *INSERT INTO user_function ( funct_name , funct_type , funct_code , funct_num_ar