dstefani has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I have a DBD syntax error, and of course I can't see the problem. The code containing the little bugger contains 3 long INSERTS each with about 300 names, place holders and variables each.
Just as a preview, here's the error
DBD::mysql::db do failed: You have an error in your SQL syntax; check +the manual that corresponds to your MySQL server version for the righ +t syntax to use near ')' at line 1 at /www/htdocs/click1003/app/strin +gform.pl line 144.
From reading other posts and replys I found in searching, more code means more help. but this may be kind of big. Would it be better to post a link to a textfile?
Thanks,
- dstefani
UPDATE 08-24
Well, using DBI->trace for the first time was an enlightening experience. It let me see a few things that I needed to look into, as mentioned in one of the replies, there was an extra comma, but it could only be seen when the place holders where replaced with the real values in the trace output. (very cool). It has to do with my ignorance with proper SQL. As a self taught hack, you tend to learn what you need to know.This has been a great stop on the learning path, I may have it straightened out now, if I don't I'll trim down one of the queries and make a PC post (monks PC that is)
Thank you all for your input, always valuable.
- dstefani
2005-08-26 jdporter unconsidered (Keep/Edit/Delete: 8/19/0). Consideration was: Change name to "Debugging DBD syntax error"
2005-08-26 jdporter Moved to SoPW.
Retitled by g0n from 'Posting a Question: best practices'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Debugging DBD/SQL syntax error
by jhourcle (Prior) on Aug 23, 2005 at 13:56 UTC | |
|
Re: Debugging DBD/SQL syntax error
by davidrw (Prior) on Aug 23, 2005 at 14:06 UTC | |
|
Re: Debugging DBD/SQL syntax error
by grinder (Bishop) on Aug 23, 2005 at 15:39 UTC | |
|
Re: Debugging DBD/SQL syntax error
by Util (Priest) on Aug 23, 2005 at 20:03 UTC | |
|
Re: Debugging DBD/SQL syntax error
by Anonymous Monk on Aug 23, 2005 at 14:46 UTC | |
|
Re: Debugging DBD/SQL syntax error
by dakedesu (Scribe) on Aug 23, 2005 at 23:50 UTC | |
|
Re: Debugging DBD/SQL syntax error
by shiza (Hermit) on Aug 23, 2005 at 15:47 UTC | |
by bradcathey (Prior) on Aug 23, 2005 at 18:50 UTC | |
by shiza (Hermit) on Aug 24, 2005 at 19:17 UTC |