Hello AR if I run this php script AR AR *$dbh = new PDO('sqlite:/var/www/test.sqlite'); AR $sql="INSERT INTO Test ( Nombre , IP , MAC , Descripcion_Modulo ) VALUES ( AR '2221' , '2121' , '1212' , '1212' ) "; AR $modulo=$dbh->query($sql); AR print_r($dbh->errorInfo()); * AR AR from outside SQLiteManager I get this errorInfo(): AR AR *Array AR ( AR [0] => HY000 AR [1] => 1 AR [2] => no such function: test AR )*
Being able to execute PHP functions from inside SQL is a bit of a bonus feature. I imagine that PDO, which implements a subset of many SQL databases' features, doesn't reach this far. If you use the SQLite3 extension in PHP, you can register your own functions. You would create the function in your PHP source, and then register it when you open the database, and then call it from your SQL statements. Perhaps you could keep your "user_function" table, and query it to get the PHP code for each function, eval it somehow and then register it with the database connection. There is more here: http://www.php.net/manual/en/sqlite3.createfunction.php I hope this helps. Swithun. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users