Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re: Re: Re: Re: Unexplained MySQL Error

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

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

Alright, I'm willing to take the XP loss here by posting this node, but I'd like to know why my rep is so low throughout this node. If my posts are so bad, I'd certainly like to know what's wrong with them so I don't make the same mistakes in the future - it looks bad for me and it wastes your time.

The top node, I can understand. It looks like your standard "I'm getting a weird error and here's what I *think* is going to the database" post by someone who's never used a db before. but even after my clarification and solution, the scores have been abysmal compared to the surrounding ones scorning me for putting up such a spurious node.

Yes, I've read Why did I get downvoted and realize that rep isn't all that important, but it is an indicator of how good your posts are, and it seems that my recent ones have been pretty useless. I'd like that improved, so feel free to lay into me and tell me exactly what you think. I'd prefer not to have this happen again.

James Beninger

  • Comment on Re: Re: Re: Re: Unexplained MySQL Error

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Unexplained MySQL Error
by Anonymous Monk on Jul 21, 2003 at 14:06 UTC
    You were downvoted because, after asking for help, you didn't take into account the advice that was given to you.

    Instead of trying to act according to what other monks tell you, you are shifting responsibility to something else.

    First, you blamed the database, then you said thet the error must be in the DBI. You can't accept the idea that the error can simply be in your code.

    It is indeed possible that there is an error in the database of in the DBI, but you can make such a claim only if you have done everything by the book, and only then, when there is nothing else to blame, we can start considering the big guys as guilty.

    Tour the Tutorials before you write your next post. :-)

      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://276278]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2017-03-01 21:53 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (429 votes). Check out past polls.