Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well, since, I'm the maintainer of all of those modules, I don't really have anywhere to pass it on to :-). Testing as we speak, I'll update when I have an answer and please /msg if you find something out in the meantime.

update1

Very, very odd. I got the same fubared results you did. But when I run the test below (which uses all the same SQL as yours), everything is copacetic. More later.
#! /usr/bin/perl -w use strict; use DBI; use FindBin; open my $fh, '>', $FindBin::Bin . '/Tanktalus'; print $fh ("DATE,NUMBER\n2005-05-16,2\n2005-05-17,4\n"); close $fh; my $dbh = DBI->connect("dbi:CSV(RaiseError=1):csv_eol=\n"); for my $sql(<DATA>){ my $sth = $dbh->prepare($sql); $sth->execute; $sth->dump_results if $sth->{NUM_OF_FIELDS}; } __END__ SELECT date,number FROM Tanktalus SELECT SUM(number) from Tanktalus UPDATE Tanktalus SET number=8 WHERE date='2005-05-17' SELECT date,number FROM Tanktalus SELECT SUM(number) from Tanktalus SELECT number FROM Tanktalus WHERE date = '2005-05-17'

update2

Ok, I can reproduce the error by using placeholders for the update in the script above. It's a SQL::Statement problem. Fix coming by morning.

update3

Ok, I found and fixed the bug in SQL::Statement. Please try grab the latest from the SVN repository and let me know if it works for you. I thanked you for the bug report in the Changes log of the distro.

In reply to Re: DBD::CSV, SQL::Statement, and UPDATE table statement by jZed
in thread DBD::CSV, SQL::Statement, and UPDATE table statement by Tanktalus

Title:
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 How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found