Re: pdo bindParam() with named parameters
| From: | Wez Furlong | Date: | Sat, 12 Feb 2005 01:39:23 +0000 |
| Subject: | Re: pdo bindParam() with named parameters | ||
| References: | 1 2 3 4 5 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-1970@lists.php.net to get a copy of this message | ||
Yes, for databases that have native binding support, PDO simply does
not know the "full query" being executed; it doesn't exist in that
form.
Prepared statements are sort-of analagous to using something like
smarty to compile a template, except that in this case, the smarty
compiler sits at the end of a pipe, and you're only allowed to send in
the template and parameters. When it's done its work, whatever is
sitting at the end of the pipe hands you back your results.
So, we can't guarantee that the data will be there.
Now, we could add some kind of logging functions to log what goes into
prepare() and bindParam(), but there are other extensions better
suited for debugging (like xdebug!) so maybe it's better just to use
those?
I'm not against adding logging, but would prefer to defer on that for now.
Is that a good enough answer ?
--Wez
On Fri, 11 Feb 2005 16:55:01 -0800, Gavin Roy <gmr.pear@gmail.com> wrote:
> On another note after working with PDO a bit, a debugging output at
> some level would be extremely valuable and help with adapting. Not
> knowing what's being sent by Execute, regardless if it's relying on
> backend assembly or not is a big hindrance. Are there serious
> technical roadblocks to offering some sort of callback to find out
> whats being sent before or after execute? Maybe a pseudo execution
> that dumps the internals?