Bug #65454 [Asn->Csd]: odbc_result return empty value

From: Date: Sun, 12 Apr 2015 10:51:34 +0000
Subject: Bug #65454 [Asn->Csd]: odbc_result return empty value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191999@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65454&edit=1 ID: 65454 Updated by: cmb@php.net Reported by: php at freakout dot de Summary: odbc_result return empty value -Status: Assigned +Status: Closed Type: Bug Package: ODBC related Operating System: Linux PHP Version: 5.4.17 Assigned To: cmb Block user comment: N Private report: N New Comment: Thanks. Previous Comments: ------------------------------------------------------------------------ [2015-04-12 09:31:30] php at freakout dot de it was a bug in the oracle odbc adapter library - is fixed now. ------------------------------------------------------------------------ [2015-04-11 15:52:22] cmb@php.net That sounds really strange. What happens if you use odbc_result() with echo? ------------------------------------------------------------------------ [2013-08-15 11:15:54] php at freakout dot de Description: ------------ Without adding an weird empty printf-statement odbc_result returns empty values run with printf-statement [axel@bongo oracle]$ ./testodbc 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER run without the statement: [axel@bongo oracle]$ ./testodbc 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Test script: --------------- #!/opt/php/bin/php <?php //system('/opt/php/bin/php --version | grep -ebuilt -ebuild -eCopyright -erevision >&2'); $query = "select empno, ename from emp"; $conn = odbc_connect("Oracle", "scott", "tiger"); if($result = odbc_exec($conn, $query)) { if(!$conn) die("Connection failed"); while($succ = odbc_fetch_row($result)) { // printf("%s",''); // without this statement odbc_result does not work printf("%4d %s\n", odbc_result($result, 'EMPNO'), odbc_result($result, 'ENAME')); } } ?> Expected result: ---------------- 7369 SMITH 7499 ALLEN 7521 WARD 7566 JONES 7654 MARTIN 7698 BLAKE 7782 CLARK 7788 SCOTT 7839 KING 7844 TURNER 7876 ADAMS 7900 JAMES 7902 FORD 7934 MILLER Actual result: -------------- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65454&edit=1

« previous php.bugs (#191999) next »