php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: aranna at free dot fr
New email:
PHP Version: OS:

 

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

...
  END
 END
 
 COMMIT TRAN
 RETURN @this_id
END 

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


Reproduce code:
---------------
Nothing.

Expected result:
----------------
Return value of @this_id

Actual result:
--------------
No output field...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-19 08:19 UTC] wez@php.net
Can you do it with mysqli? I don't believe that the mysql client library provides this functionality.
 [2007-04-19 08:26 UTC] wez@php.net
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] wez@php.net
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] tpunt@php.net
-Package: PDO_DBLIB +Package: PDO DBlib
 [2017-04-10 21:17 UTC] adambaratz@php.net
-Status: Open +Status: Duplicate
 [2017-04-10 21:17 UTC] adambaratz@php.net
This is the same issue described in #50555.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC