Re: Subtle binding bug

2002-12-01 Thread Tony Bowden
On Fri, Nov 29, 2002 at 12:33:42PM +0100, Bart Lateur wrote: I hadn't looked at this thread until now, but now that I do, I do recognize the pattern. I've had the same kind of problems with Access. What can fix this, is having an explicit bind on the variable type, after the pepare phase, but

Re: Subtle binding bug

2002-12-01 Thread Tim Bunce
On Sun, Dec 01, 2002 at 06:17:48PM +, Tony Bowden wrote: On Fri, Nov 29, 2002 at 12:33:42PM +0100, Bart Lateur wrote: I hadn't looked at this thread until now, but now that I do, I do recognize the pattern. I've had the same kind of problems with Access. What can fix this, is having an

Re: Subtle binding bug

2002-11-29 Thread Bart Lateur
On Thu, 28 Nov 2002 11:29:04 +, Tony Bowden wrote: I don't know how MySQL handles placeholders, so this is just a guess. It may simply be interpolating the string 'nine' into the query string, in the same way it interpolated the number 9, that is, without qotes: INSERT INTO user

Re: Subtle binding bug

2002-11-28 Thread Tony Bowden
On Wed, Nov 27, 2002 at 02:51:08PM -0500, Ronald J Kimball wrote: But what's the query being sent to MySQL? Why does it think that the value is the column? I don't know how MySQL handles placeholders, so this is just a guess. It may simply be interpolating the string 'nine' into the query

Re: Subtle binding bug

2002-11-27 Thread Tony Bowden
On Mon, Nov 25, 2002 at 07:48:14AM -0800, Michael A Chase wrote: I'm assuming that the first time the statement is executed something is trying to work out whether the field is numeric or string, and seeing a number, assumes it's numeric. But then, every future insert fails, with a highly

RE: Subtle binding bug

2002-11-27 Thread Jeff Urlwin
On Mon, Nov 25, 2002 at 07:48:14AM -0800, Michael A Chase wrote: I'm assuming that the first time the statement is executed something is trying to work out whether the field is numeric or string, and seeing a number, assumes it's numeric. But then, every future insert fails,

Re: Subtle binding bug

2002-11-27 Thread Michael A Chase
On Wed, 27 Nov 2002 13:12:24 + Tony Bowden [EMAIL PROTECTED] wrote: And there's still the matter of the highly misleading error message: DBD::mysql::st execute failed: Unknown column 'nine' in 'field list' The error of course being nothing to do with a column 'nine', as that's the

Re: Subtle binding bug

2002-11-27 Thread Tony Bowden
On Wed, Nov 27, 2002 at 08:28:40AM -0800, Michael A Chase wrote: On Wed, 27 Nov 2002 13:12:24 + Tony Bowden [EMAIL PROTECTED] wrote: And there's still the matter of the highly misleading error message: DBD::mysql::st execute failed: Unknown column 'nine' in 'field list' The error of

Re: Subtle binding bug

2002-11-27 Thread Ronald J Kimball
On Wed, Nov 27, 2002 at 07:00:31PM +, Tony Bowden wrote: On Wed, Nov 27, 2002 at 08:28:40AM -0800, Michael A Chase wrote: On Wed, 27 Nov 2002 13:12:24 + Tony Bowden [EMAIL PROTECTED] wrote: And there's still the matter of the highly misleading error message: DBD::mysql::st

Subtle binding bug

2002-11-25 Thread Tony Bowden
Consider the following script: #!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI-connect('dbi:mysql:music', 'user', 'pass'); my $insert = $dbh-prepare_cached(qq{ INSERT INTO user (username, password) VALUES (?, ?) }); my $delete =

Re: Subtle binding bug

2002-11-25 Thread Michael A Chase
On Mon, 25 Nov 2002 15:16:17 + Tony Bowden [EMAIL PROTECTED] wrote: Consider the following script: #!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI-connect('dbi:mysql:music', 'user', 'pass'); my $insert = $dbh-prepare_cached(qq{ INSERT