Martín Marqués <martin@bugs.unl.edu.ar> writes:
> Now, I want to do an insert of a row, in which I add data to all the columns
> except the oid column, in which I want to insert a file. How do I make the
> insert with PHP, in a way that the info of row and the file loaded
> in the oid column are really in the same row.
OK, here's pseudocode. Assuming PHP has a an interface to the lo_
routines, you'd do something like this:
BEGIN WORK;
$file_oid = lo_import("myfile");
INSERT INTO mytable(field1, field2, file_oid) VALUES ('foo', 'bar', $file_oid);
COMMIT WORK;
Does this help?
-Doug
--
Doug McNaught Wireboard Industries http://www.wireboard.com/
Custom software development, systems and network consulting.
Java PostgreSQL Enhydra Python Zope Perl Apache Linux BSD...