Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Re: Re: Re: Re: Re: Unexplained MySQL Error

by jbeninger (Monk)
on Jul 21, 2003 at 14:31 UTC ( #276298=note: print w/replies, xml ) Need Help??

in reply to Re: Re: Re: Re: Re: Unexplained MySQL Error
in thread Unexplained MySQL Error

Did you even read the "solved" post? I did everything by the book in terms of my program - I output the query before running it so I knew exactly what was going to the database, I wrote and re-wrote the query a hundred times. And as far as I could tell the advice of the monks consisted of

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): ...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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://276298]
[Corion]: "If I wanted to work with hot air, I would have become a baloonist"
[Corion]: "If I wanted to work with flaps, I would have become a mailman"
[Corion]: (I'm not sure if the last one works in English too ;) )
[Eily]: it doesn't work in French AFAIK
[Eily]: I like the first one though :)
[erix]: balloonist, surely :P (or maybe baloneyist)
[marto]: afternoon all

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-09-21 14:30 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (248 votes). Check out past polls.