On Fri, 2 Apr 2004, Rudy Lippan wrote:

> On Thu, 1 Apr 2004 [EMAIL PROTECTED] wrote:
>
> > Hi all, in my application errors are trapped in a sub that prints:
> >
> > 1) a notice to the user indicating an exception has occurred;
> > 2) the name of the script (w/ absolute path), user and $DBI::errstr
> > 3) the failed query itself wrapped in pre tags for readability
> >    (this is a web app)
> >
> > One thing needs improvement: the failed query prints the question mark
> > placeholders for my bound params/variables.  Is there a quick and
> > dirty way to have at the values the placeholders represent (i.e.,
> > values passed in the $sth->execute($i, $love, $dbi); statement?
>
> Depends on driver support but $sth->{PramValues} might be what you are
> looking for.
>
> But it looks like the driver you are using does not have support, yet:
>
>            If "$h->{ParamValues}" returns a hash reference of parameter
>            (placeholder) values then those are formatted and appended to the
>            end of the Statement text in the error message
>
> What driver are you using?

DBD-Pg, DBD-mysql and DBD-Oracle - and as of yesterday, DBD-SUV ;-)

-----------------------------------------------------------------------
Thomas Good                                  e-mail: [EMAIL PROTECTED]
Programmer/Analyst                           phone:   (+1) 718.818.5528
Residential Services                         fax:     (+1) 718.818.5056
Behavioral Health Services, SVCMC-NY         mobile:  (+1) 347.524.5631

//  It is better to vote for what you want and not get it, than to
//  vote for what you don't want and get it.   --   Eugene V. Debs

Reply via email to