note 43941 modified in function.ocifetchstatement by sixd

From: Date: Thu, 08 Oct 2009 19:19:42 +0000
Subject: note 43941 modified in function.ocifetchstatement by sixd
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161537@lists.php.net to get a copy of this message
I had a problem with ocifetchstatement, it didn't returned nor more or less than 13 rows whatever the skip or num_rows was set to.... I found that it has a bug, you MUST specify the last parameter, so i added OCI_FETCHSTATEMENT_BY_ROW to the function call and it works fine. Hope this helps someone out there ... With: $rows=ocifetchstatement ($st, &$arr, 0, 20); Returns: $rows � 20 count($arr) � 13 !!! (should be 20) Now here's the working version: With: $rows=ocifetchstatement ($st, &$arr, 0, 20, OCI_FETCHSTATEMENT_BY_ROW); Returns: $rows � 20 count($arr) � 20 wich are the right values. Regards, Humberto Silva http://www.humbertosilva.com/ --was-- I had a problem with ocifetchstatement, it didn't returned nor more or less than 13 rows whatever the skip or num_rows was set to.... I found that it has a bug, you MUST specify the last parameter, so i added OCI_FETCHSTATEMENT_BY_ROW to the function call and it works fine. Hope this helps someone out there ... With: $rows=ocifetchstatement ($st, &$arr, 0, 20); Returns: $rows » 20 count($arr) » 13 !!! (should be 20) Now here's the working version: With: $rows=ocifetchstatement ($st, &$arr, 0, 20, OCI_FETCHSTATEMENT_BY_ROW); Returns: $rows » 20 count($arr) » 20 wich are the right values. Regards, Humberto Silva http://www.humbertosilva.com/ http://php.net/manual/en/function.ocifetchstatement.php

« previous php.notes (#161537) next »