From: <ope...@ya...> - 2005-06-29 16:08:12
|
Marcin, if LIMIT didnd't help, does this help? $rs =& $rs->Execute($sql); while (!$rs->EOF) { var_dump($rs->fields); $rs->MoveNext(); } perhaps you can modify the code with a counter process. also, if you haven't gotten an answer, try posting here... http://phplens.com/lens/lensforum/topics.php?id=4 try to narrow down your question so folks know exactly what you want and you should get some kind of definitive answer. best of luck. > 1. Re: adodb execute method (Marcin Szkudlarek) > > --__--__-- > > Message: 1 > Date: Tue, 28 Jun 2005 08:22:11 +0200 (CEST) > From: Marcin Szkudlarek <ma...@mi...> > To: ado...@li... > Subject: Re: [ADodb-general] adodb execute method > > Unfortunately, it's not the solution of my problem. > Try to execute this > code: > > $rs_notes = $db->Execute($sql_notes); > var_dump($rs_notes); > > you would see that adodb got all the data from > database after executing > the first line. I don't want that because I don't > know how many rows I > would need (in the worst case I would have to get > all the data). Look at > another example in oci: > > $stmt = oci_parse($conn, $q, 0); > if(!$stmt) { > $err = oci_error($conn); die($err['message']); > } > > $re = oci_execute($stmt); > if(!$re) { > $err = oci_error($stmt); die($err['message']); > } > > $i=1; > while ( ($row = oci_fetch_array($stmt, > OCI_ASSOC))) { > var_dump($row); > if(++$i > 100) > break; > } > > I got here first 100 rows without getting the rest > and saving it in > memory (like adodb does). I benchmarked this oci > code and equivalent > adodb code on 2,500 rows table and oci was about 5 > times faster. > > Regards, > > Marcin ____________________________________________________ Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com |