in reply to SQL causing 500 error (was: What's Wrong With This?)

apart from the other useful suggestions (particularly CGI::Carp's fatalsToBrowser, which is indispensable for CGI debugging IMHO), i would suggest enabling DBI's trace mode.

perldoc DBI for details, but in a nutshell you just say DBI->trace(2), changing the level (2) to taste.

at level 2 you can see how your statement was prepared, how the variables were bind-ed (bound), and what the resultant string used was. i have found this to be more than adequate debugging information for almost all DBI-related bugs i've written thus far.

HTH.

  • Comment on Re: SQL causing 500 error (was: What's Wrong With This?)