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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
36 - 2 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 18 21:01:29 2024 UTC