|
Posted by James on 01/12/06 00:53
Hey,
Thanks for the feedback.
Unfortunately using param names doesn't work either.
All Database functions seem to work perfectly "except" fro output params.
All of the examples I've found on the net point to using "?" as the
parameter rather than "@?" (or "@:name" rather than ":name" for var names)
Unfortunately when I do this, I get :
> SQLSTATE: HY000
> ERROR CODE: 1414
> ERROR: OUT or INOUT argument 1 for routine test.sp_returns_string is
not a variable
Anyway, when I include the "@" it simply returns nothing...
I just can't seem to find any working examples anywhere...
Thanks,
James.
Louis-Philippe Huberdeau wrote:
> I have always used named parameters with PDO. I don't like having to rely on
> the parameter order.
>
> $stmt = $db->prepare( "SELECT foo FROM bar WHERE baz = :baz" );
> $stmt->bindParam( ':baz', 123 );
> $stmt->execute();
>
> Did you try using PDO with a simple query first using your @? symbol? The
> problem might not be with the stored procedure, but with the parameter
> binding.
>
> --
> Louis-Philippe Huberdeau
>
[Back to original message]
|