|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44305 odbc_next_result - mysql procedure with multiple results
Submitted: 2008-03-01 17:04 UTC Modified: -
Avg. Score:4.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:0 (0.0%)
From: martin dot dufka at atlas dot cz Assigned:
Status: Open Package: ODBC related
PHP Version: 5.2.5 OS: WIN2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: martin dot dufka at atlas dot cz
New email:
PHP Version: OS:


 [2008-03-01 17:04 UTC] martin dot dufka at atlas dot cz
problem with: odbc_next_result()
mysql-server: 5.0.51a (.45-the same problem)
odbc driver: Driver={MySQL ODBC 3.51 Driver}

when MySQL procedure returns 2 rowsets, after the second rowset odbc_next_result() returns true. 

Reproduce code:
CREATE PROCEDURE `multiplerowsets`()
  select 'rs1';
  select 'rs2';
  $dsn="Driver={MySQL ODBC 3.51 Driver};Server=localhost;Port=3306;Database=db_name;";

  $query="call multiplerowsets";

    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));
    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));
    $row=odbc_fetch_array ($result); var_dump(odbc_next_result($result));

Expected result:
bool(true) bool(false) bool(false)

Actual result:
bool(true) bool(true) 
Warning: odbc_fetch_array() [function.odbc-fetch-array]: No tuples available at this result index in D:\Apache2.2\htdocs\test\x.php on line 19


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jul 15 18:01:26 2020 UTC