Code Comments
Programming Forum and web based access to our favorite programming groups.If HAVE_SQL_EXTENDED_FETCH is defined, then the odbc ext will use the ODBC API function SQLExtendedFetch instead of SQLFetch to retrieve records. SQLExtendedFetch is only necessary if a forward-only cursor is not being used. In the case of the odbc ext, it uses a dynamic cursor if HAVE_SQL_EXTENDED_FETCH is defined. The problem is that dynamic cursors have the worst performance, while forward-only cursors have the best performance. However, forward-only cursors do not allow you to predetermine the number of rows. This is why you are getting -1 from odbc_num_rows(). A static cursor should have been used instead of a dynamic cursor. While it is not faster than forward-only, it is faster than dynamic, and still allows you to get a row count. -- bob On Thu, 26 Aug 2004, Mahmut Eren wrote: > Hi, > I'm using php-4.3.3 on mandrake Linux. I had a performance problem access= ing to DB2 databases on As400 systems. When I searched the internet I found= out that commenting out '#define HAVE_SQL_EXTENDED_FETCH 1' lines from php= _odbc_includes.h file could solve the problem. I edited the file and recomp= iled php; the result was a much better performance. But this time odbc_num_= rows() statement fails and always returns -1. How can I solve this problem?= Any suggestions? > Thanks in advance > Mahmut Eren > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= 3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D- > Bu e-postaece yukarida isimleri belirtilen kisiler arasinda =F6zel ha= berlesme amacini tasimaktadir. Size yanlislikla ulasmissa l=FCtfen g=F6nder= en kisiyi bilgilendiriniz ve mesaji sisteminizden siliniz. Turkiye Cumhuriy= et Merkez Bankasi A.S. bu mesajin icerigi ile ilgili olarak hicbir hukuksal= sorumlulugu kabul etmez. > > This e-mail communication is intended for the private use of the people n= amed above. If you received this message in error, please immediately notif= y the sender and delete it from your system. The Central Bank of The Republ= ic of Turkey does not accept legal responsibility for the contents of this = message. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.