new function odbc_execsp()
| From: | Grigoriy G. Vovk | Date: | Tue, 17 Oct 2000 10:14:39 +0000 |
| Subject: | new function odbc_execsp() | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35235@lists.php.net to get a copy of this message | ||
Ok, I understand, may be, it isn't interested for all people.
I will use this function self.
I sent 16.10.00 a mail with description of the new php_function
odbc_execsp, which can execute stored procedure and return values in
variables, (not record set), and I asked for help with 2-dimensional
array and empty string.
And I have not answer.
Now I've rewriting it with 2-dimensional array.
But problem with empty string stay.
odbc_executesp(result_id, param_array[][])
where first dimension of the param array is type of value in second
dimension - "in" or "out"
for example, stored procedure
sp_test(in a integer, out b varchar(5), out c varchar(5))
we do in php
ar[0][0]="in";
ar[0][1]=153;
ar[1][0]="out";
ar[1][1]="?"; -- any string
ar[2][0]="out";
ar[2][1]="?"; -- any string
res=odbc_pconnect(...);
odbc_prepare(res, "call sp_test( ?, ?, ?)");
odbc_executesp(res, &$ar);
echo "First output {$ar[1][1]}<br>";
echo "Second output {$ar[2][1]}<br>";
Problem is in the arr[1][1] and in the ar[2][1] - we must put any
string in it. If pass empty string, this function will not work.
I don't know why.
I want to resolve this problem, if anybody can help me.
If not, I will use this function so.
-----------------------------
Grigoriy G. Vovk
Grigoriy.Vovk@parmastocks.com