Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
I take the opportunity to point to DBIx::Simple, which provides means to insert this kind of stuff automatically, if you use a double question mark.
$db->query('INSERT into monica.event (msg, source, situation, version, + date, hostname, last_uid, sub_origin, component, guid, severity, ada +pter_host) values (??)', 'this is a test event, ignore', 'Testing', ' +START', '0.1', '2006-11-28 19:13:18', 'test', '', 'SelectDocument', ' +IT_SERVICE', '623375574', 'CRITICAL', 'this_box');
Or even, using the SQL::Abstract mode:
$db->insert('monica.event' => { 'msg' => 'this is a test event, ignore', 'source' => 'Testing', 'situation' => 'START', 'version' => '0.1', 'date' => '2006-11-28 19:13:18', 'hostname' => 'test', 'last_uid' => '', 'sub_origin' => 'SelectDocument', 'component' => 'IT_SERVICE', 'guid' => '623375574', 'severity' => 'CRITICAL', 'adapter_host' => 'this_box' });
which I like very much.

DBIxSimple will build the proper SQL statement, and cache the statement handle for you, for if you use it more than once. Which is very neat.

In reply to Re^2: DBD::mysql "Column count doesn't match value count" by bart
in thread DBD::mysql "Column count doesn't match value count" by Random_Walk

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

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    [choroba]: Most coffees? Depends on the country :-)
    [choroba]: oh, you mean a cup with no water.
    [Discipulus]: you are rigth, gory details but i remember from dunnowhere that concetrate caffein is more effective than brown water almost coffe..
    [LanX]: prepared both kinds a 100 times and thinks the amount of grind code is about the same
    Discipulus less effective i mean

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (10)
    As of 2017-01-16 10:55 GMT
    Find Nodes?
      Voting Booth?
      Do you watch meteor showers?

      Results (148 votes). Check out past polls.