Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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 ./ 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?


In reply to database table named 'with' by davidj

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • 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> <u> <ul>
  • 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 intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2021-12-04 12:59 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (30 votes). Check out past polls.