Re: hi, guys, please help me with this problem.(please read this one)

From: Date: Sat, 08 Jul 2000 01:06:50 +0000
Subject: Re: hi, guys, please help me with this problem.(please read this one)
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-968@lists.php.net to get a copy of this message
Most likely the ASP statement is querying the entire 48000 records and returning the 20 or 40 results. ASP can't see the database, only Oracle can. Asp uses functions to interact with Oracle. All of those SQL statements are dependant on Oracle (PHP doesn't handle any SQL). If Oracle doesn't have a limiting function then you will have to query all of the records. The good thing is Oracle is probably extremely fast ;O) Of course you could switch to MySQL and use their fancy LIMIT function the only returns a specific number of rows. ----- Original Message ----- From: "Eric Wang" <eric@otherways.com> To: <php-db@lists.php.net> Sent: Friday, July 07, 2000 8:47 PM Subject: [PHP-DB] hi, guys, please help me with this problem.(please read this one) > > I have a problem with php and oracle. > so far I still think this a defect of php. > you know, this is a dataset in asp which we can use page or something, > let the actually records we got just were limited to 1 page. > but php seems has no such fuction. > so i tried everything I can do to make i can get the same result with > php, so far no luck. > > > > anybody can make php only get the 20 to 40 records from this sql > statement? > > select * from table1 where a=b order by c > > I trid: > > select * from table1 where a=b and rownum<40 order by c > minus > select * from table1 where a=b and rownum<20 order by c > oracle return a error for this > > though this work: > select * from table1 where a=b and rownum<40 > minus > select * from table1 where a=b and rownum>20 > order by c > > this work > > but I think this a slight difference there which we order firstly then > minus and minus firstly then order. > > > i only need the 20 to 40 records in this result. > > sure we can make a cyle and use OCIfetch only get 20 to 40. > but if the result consist 50,000 records, and I need get 48,000 to > 48,020, this whole thing become so painful. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#968) next »