Why is PHP's OCI8/Oracle oci_bind_array_by_name not working for me?

前端 未结 1 743
無奈伤痛
無奈伤痛 2021-01-26 03:12

I\'m trying to bind a php variable to pl/sql array. The pl/sql procedure works fine when I execute it manually and set the bind, so I know that\'s not the problem. It\'s the <

相关标签:
1条回答
  • 2021-01-26 03:45

    And I feel like a fool because I did not read the API closely enough. Apparently I was specifying the max_table_length but the error message was referring to the max_item_length which I left as -1... but that's a no-no since I'm binding an OUT parameter instead of an IN one.

    Changed the bind like so and it now works:

    oci_bind_array_by_name($stmt,'USER_ID_ARRAY', $userIdArray, 250, 250, SQLT_VCS);
    
    0 讨论(0)
提交回复
热议问题