I used your and Fletch's suggestions and here's what I came up with.

1. Setting a tracelevel of 2 on the problem statement handle pretty much confirmed that DBI is having a quoting problem. The single char strings are not getting quoted(ironically, the 5-8 digit int is :) Well I think we all pretty much knew that was part of the problem based on the error message.
2. I used hardcoded values in the prepare statement and it worked fine. As soon as I used the placeholders though, everything goes bad. NONE of the string values are being treated as such. 3. I tried explicitly binding the parameters but to no avail. Still the chars are not quoted.

I did get it to work using the 'do' method, but that is less efficient since the statement is executed inside a loop. Now the statement has to be prepared each time through the loop(which is better than not working at all I suppose :). Still though, for efficiency's sake I'd rather use the 'prepare-execute' method, so I'd still like to figure this out.

Anyway, here's what the trace on the statement handle output to STDOUT:

DBI::st=HASH(0x87b0d80) trace level set to 2 in DBI 1.13-nothread Note: perl is running without the recommended perl -w option SANFRNCSCO**** -> bind_param for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d8 +0 1 undef) <- bind_param= 1 at bb_ps_stats.pm line 49. -> bind_param for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d8 +0 2 R) <- bind_param= 1 at bb_ps_stats.pm line 50. -> bind_param for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d8 +0 3 R) <- bind_param= 1 at bb_ps_stats.pm line 51. -> bind_param for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d8 +0 4 A) <- bind_param= 1 at bb_ps_stats.pm line 52. -> bind_param for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d8 +0 5 '10457') <- bind_param= 1 at bb_ps_stats.pm line 53. -> execute for DBD::mysql::st (DBI::st=HASH(0x83dd82c)~0x87b0d80) -> dbd_st_execute for 083dd634 Binding parameters: UPDATE players SET t_id=NULL, bats=R, throws +=R, status=A WHERE id='10457' Unknown column 'R' in 'field list' error 5 recorded: Unknown column 'R +' in 'field list' <- dbd_st_execute -2 rows !! ERROR: 5 'Unknown column 'R' in 'field list'' <- execute= undef at bb_ps_stats.pm line 54. -> $DBI::errstr (&) FETCH from lasth=DBI::st=HASH(0x87b0d80) No status UPD: Unknown column 'R' in 'field list' -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x87b0d80)~INNER) <- DESTROY= undef at unknown location!
Doesn't reveal anything new to me but who knows what you'll see.

Thanks again.

Amel - f.k.a. - kel


In reply to Re: Re: DBI/DBD::mysql bugs? by dsb
in thread DBI/DBD::mysql bugs? by dsb

Title:
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, details, 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, summary, 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.