Ok fellow monks,
This is a strange one. I'm using DBI to update a mysql database. There are 5 integer fields. If I name the last field 'with', I get an SQL syntax error. If I change the name of the field to something else, I don't get the error.
This is the error I get when naming the field 'with'. (All of the fields are integer fields):
DBD::mysql::st execute failed: You have an error in your SQL syntax.
+Check the manual that corresponds to your MySQL server version for th
+e right syntax to use near 'with) VALUES (11,'14','1','1','1')' at li
+ne 1 at ./put1.pl line 25, <CEV> line 1.
I have searched SQL documentation and unless I am missing something, 'with' is not a keyword that would cause confusion. Is there something special about the word in Perl that would be causing this error?
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.