in reply to Re: Re: Re: Re: Re: Unexplained MySQL Error
in thread Unexplained MySQL Error
A) Post some code (which I did), and
B) Use DBI->trace(), which I did, and was the solution I was looking for.
As to my assertion that the error is in the DBI code, and not my own, here's the error I was getting in the Apache logs (using $dbh->{ShowErrorStatement}, which according to the documentation prints out the offending query):
image_admin.pl: ...You have an error in your SQL syntax near '' at line 1 [for stateme +nt ``SELECT parent_id FROM categories WHERE id=1'']) at ...
The error was in fact in a different query:
UPDATE categories SET name='some name', parent_id=2 WHERE id=
Had that been in the error logs, I wouldn't have had a problem finding it. So it's an error either in the DBI error logging, or in the DBI documentation of ShowErrorStatement.
I understand people who are leery of assertions that just-written code is better than an established codebase, but I feel I have a good case here.
|
|---|