|
Posted by Toby A Inkster on 02/19/07 12:58
Tonio wrote:
> I got and an exception handler, and I want, for each PDOException
> throwned, to get the whole query which didn't works.
Not from the exception itself, no.
$exception->errorInfo[2] has some useful info, but its contents are
engine-specific, so may or may not contain the original SQL query
that triggered the error.
Why do you want to know the offending SQL query anyway? If you report
it back to the user, it could reveal a vulnerability in your code,
which could be used by a malicious user as a weak point to break into.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|