php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24256 OCIFetch* returns truncated results
Submitted: 2003-06-19 09:14 UTC Modified: 2003-08-18 19:43 UTC
From: php at pgregg dot com Assigned:
Status: No Feedback Package: OCI8 related
PHP Version: 4.3.2 OS: Windows 2000 Server (maybe more)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
5 + 3 = ?
Subscribe to this entry?

 
 [2003-06-19 09:14 UTC] php at pgregg dot com
Description:
------------
Oracle 8.1.7 client on PHP server, PHP 4.2.3 talking to an Oracle 7.something server.

I've found that when I loop through OCIFetchInfo to return all the rows of a query, that it gets to a particular row and then the OCIFetchInto() returns false indicating that there are no more rows.

However - the exact same query via TOAD works fine.

e.g.
SELECT
			employee.swlogin,
			worklog.swworklogid,
			worklog.swobjecttype,
			worklog.swobjectid,
			worklog.swsubject,
			worklog.swnote,
			worklog.swaction,
			to_char(worklog.swdatecreated, 'yyyymmddhh24miss') as swdatecreated
			FROM sw_work_log worklog, sw_person employee
			WHERE worklog.swcreatedby = employee.swlogin
			  AND employee.swlogin = 'mmccryst' 
			AND worklog.swdatecreated >= to_date('20021003000000', 'yyyymmddhh24miss')
			AND worklog.swdatecreated < to_date('20021004000000', 'yyyymmddhh24miss')


via PHP/OCI8 returns 6 rows.
via TOAD returns 17 rows.

When I add a line to the SQL to make it ignore the 7th result: AND worklog.swworklogid <> 268055

via PHP/OCI and TOAD it now returns 16 rows.

The same phenomenon occurs if I try and pull back all the rows in one go via OCIFetchStatement().

If I reverse the <> to = so that I only want the row causing the problem (worklogid is unique) then TOAD gives me 1 row, PHP gives me none.

The row isn't any different from any other row and only contains ASCII (swnote is a copy of the "export" command from a unix machine).

Any thoughts?



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-18 19:43 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC