php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51196 SQLT_INT or OCI_B_INT not binding correctly
Submitted: 2010-03-03 13:53 UTC Modified: 2012-10-26 05:12 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: joel at layers dot com Assigned: sixd (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 5.3.1 OS: linux 2.6.21.7-2.fc8xen
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:
40 - 12 = ?
Subscribe to this entry?

 
 [2010-03-03 13:53 UTC] joel at layers dot com
Description:
------------
When trying to bind the return value of a function as SQLT_INT or OCI_B_INT, the value that is bound upon return shows as int(-4294964414), where the expected is 2882, in our case.  The oracle function returns NUMBER data type.

Changing the bind type to SQLT_CHAR resolves the problem.

This worked in php 5.2.11


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-03 14:12 UTC] joel at layers dot com
As a test, try this PLSQL function with the SQLT_INT or OCI_B_INT bind types...

CREATE OR REPLACE FUNCTION FUNCTION1 RETURN NUMBER AS 
BEGIN
  RETURN 234;
END FUNCTION1;
 [2010-03-05 08:07 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2010-03-05 08:07 UTC] sixd@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2012-10-26 05:12 UTC] sixd@php.net
-Status: Feedback +Status: No Feedback
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 08:01:28 2024 UTC