Re: Re: Oracle row limit support (again)

From: Date: Fri, 30 Nov 2001 17:22:09 +0000
Subject: Re: Re: Oracle row limit support (again)
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3244@lists.php.net to get a copy of this message
On Friday 30 November 2001 17:48, Manuel Lemos wrote: > Hello, > > "Tomas V.V.Cox" wrote: > > Well, finally I thought in a better solution for the problem. > > Instead of breaking my head with the SQL parser and trying to guess > > the resultant columns for building the special query needed by the > > limit stuff, I used a nice trick: launch the real query but with a > > special clausule (WHERE NULL = NULL) that won't return anything > > execept the field names I need. > > Shouldn't that be NULL<>NULL? NULL=NULL evaluates true, so it will > return all rows that you selected. PL/SQL Release 8.1.5.0.0 - Production SQL> select * from (select * from php_limit) where null = null; no rows selected (the php_limit table has 10.000 rows in) > Anyway, I think you may need to have the whole condition in the > because of joins. Show the query I launch: "select * from ($original_query) where null = null" > Other than that, I may be mistaken, I think that in past PHP 4 > versions Oracle did not return the result set metadata if it did not > select any rows. I think Thies could answer this because he did PHP > OCI API. The hole PEAR is a modern proyect that takes advantage of the lastest PHP features and doesn't offer support for outdated PHP versions (this is php < 4.0.4), so no problem here. Tomas V.V.Cox

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