|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57626 Stored procedure and RETURN
Submitted: 2007-04-19 03:27 UTC Modified: 2017-04-10 21:17 UTC
From: aranna at free dot fr Assigned:
Status: Duplicate Package: PDO DBlib
PHP Version: 5.2.1 OS: RH
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: aranna at free dot fr
New email:
PHP Version: OS:


 [2007-04-19 03:27 UTC] aranna at free dot fr
Here the content of a sybase stored procedure with return a value of a field at the end like :

 RETURN @this_id

Impossible to get @id_fax with PDO. RETURN values are not available.

Reproduce code:

Expected result:
Return value of @this_id

Actual result:
No output field...


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-19 08:19 UTC]
Can you do it with mysqli? I don't believe that the mysql client library provides this functionality.
 [2007-04-19 08:26 UTC]
oh, sybase eh?
I'm guessing that you're using PDO_DBLIB then.
My suggestion is to use PDO_ODBC and use the freetds ODBC driver and then bind this_id as an out parameter.
 [2007-04-19 16:50 UTC] aranna at free dot fr
Why using ODBC when as you said i use PDO_DBLIB with Freetds API ?

If you use standart Sybase api (sybase_connect, etc..) you can get RETURN value.
 [2007-04-19 17:19 UTC]
I'm trying to tell you that you should use ODBC if you want this to work, as PDO_DBLIB doesn't currently support this.
 [2017-04-01 21:23 UTC]
-Package: PDO_DBLIB +Package: PDO DBlib
 [2017-04-10 21:17 UTC]
-Status: Open +Status: Duplicate
 [2017-04-10 21:17 UTC]
This is the same issue described in #50555.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 31 14:01:24 2020 UTC