Re: MDB2: NULL in LOB fields

From: Date: Mon, 24 Jan 2005 15:26:03 +0000
Subject: Re: MDB2: NULL in LOB fields
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35693@lists.php.net to get a copy of this message
Manuel Lemos wrote:
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?
Yeah that is the only workaround I can think of. Quite a hassle, so it goes.
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.
Well I am using PHP increasingly for non web related stuff. And I suspect other people are doing the same. This is why I also implemented unbuffered queries. But yes for most uses in the webspace there will be little benefit. Eventually ext/pdo might even add prepared statement caching and better connection pooling, but alas that is still far off and not of concern to the PHP4 side of MDB2 anyways. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

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