|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-04-11 15:52 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2015-04-11 15:52 UTC] cmb@php.net
[2015-04-12 09:31 UTC] php at freakout dot de
-Status: Feedback
+Status: Assigned
[2015-04-12 09:31 UTC] php at freakout dot de
[2015-04-12 10:51 UTC] cmb@php.net
-Status: Assigned
+Status: Closed
[2015-04-12 10:51 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 21:00:01 2025 UTC |
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