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_args , base_id )
VALUES ( 'Test' , 1 , 'function test() { syslog(LOG_ALERT,"Hello trigger
world"); }' , 0 , 2 ) * *;*

Then I've created this trigger:

*CREATE TRIGGER Test AFTER
INSERT ON Test_table FOR EACH ROW BEGIN
SELECT test ( ) ;
END * *;*

And, if I insert a new row in the test_table (from SQLIteManager) everything
works and I get the message in syslog.

BUT!!

if I run this php script

*$dbh = new PDO('sqlite:/var/www/test.sqlite');
$sql="INSERT INTO Test ( Nombre , IP , MAC , Descripcion_Modulo ) VALUES (
'2221' , '2121' , '1212' , '1212' ) ";
$modulo=$dbh->query($sql);
print_r($dbh->errorInfo()); *

from outside SQLiteManager I get this errorInfo():

*Array
(
    [0] => HY000
    [1] => 1
    [2] => no such function: test
)*


can anybody help me??

Regards
Chano
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to