Reply to Re: BIG PDO issues with StoredProc output params with PHP 5 and MySQL 5

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация