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:
Doesn't reveal anything new to me but who knows what you'll see.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!
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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |