|  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
 [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-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 01:03:34 2021 UTC