`
phpseyo
  • 浏览: 158461 次
  • 性别: Icon_minigender_1
  • 来自: 广西
社区版块
存档分类
最新评论

PROCEDURE can’t return a result set in the given context

 
阅读更多

PROCEDURE db.procedure_name can't return a result set in the given context

Of course ‘db.procedure_name’ was the actual name of the procedure I was calling. Googling for the error seemed to indicate that the MySQL client library was old, but this is on a fairly modern CentOS 5.5 server with the php-mysql package at version 5.1.6.

After a bit of experimenting, I found that I was able to change to using the mysql improved versions of the PHP functions and that worked fine

     $dbconn = mysql_connect($dbhost, $dbuser, $dbpass);
     $result = mysql_query("CALL db.procedure_name('arg1', 'arg2', 'arg3')", $dbconn)
     $row    = mysql_fetch_assoc($result);

Becomes

    $dbconn = mysqli_connect($dbhost, $dbuser, $dbpass);
    $result = mysqli_query($dbconn, "CALLdb.procedure_name('arg1', 'arg2', 'arg3')");
    $row    = mysqli_fetch_assoc($result);
分享到:
评论

相关推荐

    数位板压力测试

    The device must define an absolute or relative coordi-nate space in at least two dimensions for which it can return position data. The device must have a point-ing ap¬para¬tus or method (such as a ...

    微软内部资料-SQL性能优化3

    To make use of either more or less strict isolation levels in applications, locking can be customized for an entire session by setting the isolation level of the session with the SET TRANSACTION ...

    PLSQL.Developer(X64) v12.0.1.1814 主程序+ v11中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    PLSQL.Developer(X32) v12.0.1.1814主程序+ v11中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.4.1826x32主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.6.1832x32主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    plsqldev12.0.4.1826x64主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    a project model for the FreeBSD Project.7z

    [1] This paper will provide such a project model and is donated to the FreeBSD Documentation project where it can evolve together with the project so that it can at any point in time reflect the way ...

    微软内部资料-SQL性能优化5

    Each index row in node pages contains an index key (or set of keys for a composite index) and a pointer to a page at the next level for which the first key value is the same as the key value in the ...

    plsqldev12.0.6.1832x64主程序+ v12中文包+keygen

    The result set selection can now be copied as an expression list: "column in (value, value, ...)" by right-clicking on a selection and selecting "Copy as expression list" from the popup menu....

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: The result rectangle incorrectly calculated in the TFlexText.GetRefreshRect method. - FIX: Added FPaintCache.rcPaint cleanup in the TFlexPanel.WMPaint method. Now it is possible to define is ...

    微软内部资料-SQL性能优化2

    Assuming the page reference does not result in an access violation, a page fault can be either hard or soft. A hard page fault results in a read from disk, either a page file or memory-mapped file. A...

    i-vector的工具箱

    On the other hand, in the i-vector framework the speaker models are estimated through a procedure called Eigenvoice adaptation. A total variability subspace is learned from the development set and is...

    A Procedure for the Solution of Lambert's Orbital Boundary V.pdf

    The overall procedure has been implemented via three Fortran-77 subroutines, listings of which are appended to the paper, and the way in which the subroutines have been tested is outlined.

    oracle procedure

    CREATE OR REPLACE PROCEDURE test_xg_p2 (a IN NUMBER, x OUT NUMBER) IS BEGIN x := a; END test_xg_p2; ``` 此Procedure接受一个输入参数`a`并将其赋值给输出参数`x`。 ### 使用CASE语句进行条件判断 #### ...

    Sakemail

    The side effect for this is that YOUR app must check if the host is a host name or a IP address, in my app I remove the periods and try to convert the result to a float (long integers don‘t work, ...

    折半查找 binarySearch

    If the list of names is in sorted order, a binary search will find a given name with far fewer probes than the simple procedure of probing each name in the list, one after the other in a linear ...

    VclZip pro v3.10.1

    PLEASE TAKE A LOOK AT THE "WHAT's NEW IN THIS VERSION" LINK IN THE HELP FILE AS IT HAS CONVENIENT LINKS TO ALL OF THE NEW TOPICS. ==================== Version 3.10 Build 1 - Several bug fixes. - ...

Global site tag (gtag.js) - Google Analytics