php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44240 No data returned by ODBC
Submitted: 2008-02-25 08:32 UTC Modified: -
Votes:5
Avg. Score:4.0 ± 0.9
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: johann dot maurer at bfh dot ch Assigned:
Status: Open Package: ODBC related
PHP Version: 5.2.5 OS: Win2003 SP2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-02-25 08:32 UTC] johann dot maurer at bfh dot ch
Description:
------------
OS: Win2003 SP2
IIS: 6.0.3790
ISAPI - connection


No data is returned from DB (Sybase-Anywhere) over ODBC interface since running php 5.2.5. Connection and select are OK, but no data is returned.
I tested without changing anything on the ODBC setup, only switched PHP-Version, restarted iis.


Thanks
Johann

Reproduce code:
---------------
<?php
$dbo = odbc_connect( 'rektor-php','odbc_test','tester');
echo "odbc = $dbo <br>";
$qry = "select * from rektor.odbc_Test where Data like 'a%' ";
echo "qry = $qry <br>\n";
$dbid = odbc_exec($dbo,$qry);
echo "dbid = $dbid <br>";
$res = odbc_result_all($dbid);
if ($res == false) echo 'fetch = false! <br>';
echo "fetch = '$res' <br>";
print_r($a_res);
odbc_free_result($dbid);
?>


Expected result:
----------------
Testoutput with php 5.1.2
-------------------------

odbc = Resource id #3
qry = select * from rektor.odbc_Test where Data like 'a%'
dbid = Resource id #4
ColID	Data
1	aaaaaaaaa
2	abcdefgh
fetch = '2'  


Actual result:
--------------
Testoutput with php 5.2.5
-------------------------

odbc = Resource id #3
qry = select * from rektor.odbc_Test where Data like 'a%'
dbid = Resource id #4
ColID	Data
	
	
fetch = '2' 

Comment: Two blank rows returned.

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jun 03 07:01:25 2020 UTC