Re: MDB2: NULL in LOB fields

From: Date: Mon, 24 Jan 2005 15:22:53 +0000
Subject: Re: MDB2: NULL in LOB fields
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35692@lists.php.net to get a copy of this message
Hello, on 01/17/2005 11:23 AM Lukas Smith said the following:
I have a serious problem with the LOB handling in oracle. Specifically it seems like its impossible to insert a NULL value into a LOB field using prepared queries unless that field is set to NULL in the prepared query itself.
Why don't you just create a new prepared statement when you need to insert null in LOB fields?
MDB2 can already handle doing the necessary changes to a prepared query. But until now this meant doing a prepare call for every execute() call. The theory beind prepared statements is that you define the structure of the query once and have the RDBMS analyze that and then define the data to be used inside (mutliple) subsequent calls to execute().
I can see that you are going through a lot of effort to use native prepared queries with databases that support it. However, I suspect that you are probably making an huge effort to implement something that PHP applications can hardly benefit as in most cases each different query is only used once in each script and when the same script is run again you still need to prepare the queries again. The question is if your effort is worth any significant benefits? Maybe it would be worth it if you were running PHP code in a long lived application server that would not close connections. Other than that, I am afraid you are only raising the chances of adding more bugs where none existed. -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html

« previous php.pear.dev (#35692) next »