Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: error ..ON DUPLICATE KEY UPDATE value='''

by runrig (Abbot)
on Aug 02, 2013 at 16:03 UTC ( #1047617=note: print w/replies, xml ) Need Help??

in reply to error ..ON DUPLICATE KEY UPDATE value='''

Does not seem like a perl problem. What if you directly execute that insert/update statement in a sql client?
  • Comment on Re: error ..ON DUPLICATE KEY UPDATE value='''

Replies are listed 'Best First'.
Re^2: error ..ON DUPLICATE KEY UPDATE value='''
by mje (Curate) on Aug 02, 2013 at 16:54 UTC

    Have you got DBI's RasieError set? Look for a call to DBI->connect and see if RaiseError => 1. If yes, then your call to do on line 14 just before your Dumper call will die and all your seeing in the Dumper output is from the last successful call and not the one that is failing. If so do:

    eval { $dbh->do($sql); }; if (my $ev = $@) { print Dumper($sq); die $ev; }

    Now you'll only get Dumper output for the failing case.

      RaiseError => 1 is set. the error i get now is this..
      $VAR1 = 'INSERT INTO products_features (product_id, feature_id, value) VALUES (5652151, , \'\') ON DUPLICATE KEY UPDATE value=\'\'';
      looks like the feature_id, value is empty here..What can i do to fix this..
        What values should be inserted? If a blank feature_id is valid, supply a NULL (no quotes). If it is not valid, then skip that record.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047617]
[atcroft]: Lady_Aleena: I found the L<name|section> syntax, which describes linking to a perl manual page, and L<text|url> to link to a web page. The reason I asked was because I was on looking at a module,
[atcroft]: and it referred to several other modules, but the links went to I found that a bit of a surprise, and it got me wondering if there was a "standard" way to link to other modules in the documentation on CPAN.
[Lady_Aleena]: atcroft. maybe look at raw PODs. There is also L<foo|http://foo. com> and some might be linking directly to meta::cpan.
[Lady_Aleena]: Oops, didn't read the L<text|url> right.

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-05-27 03:51 GMT
Find Nodes?
    Voting Booth?