Re: Class::DBI does not support numeric column names

[prev] [thread] [next] [Date index for 2005/06/21]

From: David Baird
Subject: Re: Class::DBI does not support numeric column names
Date: 18:25 on 21 Jun 2005
Simon Wilcox wrote:
> On Tue, 21 Jun 2005 bwebb9@xxxxx.xxx wrote:
> 
> 
>>I am using MySQL 4.1.12 and Class::DBI 0.96. I have a database with
>>numeric column names. Class::DBI has many problems dealing with these
>>columns. It does not quote them properly when executing sql statements.
>>Additionally, a column named "0" causes all sorts of problems because it
>>evaluates to false in perl. Class::DBI seems to have boolean checks on
>>column names.
> 
> 
> Having numerical column names seems like such a bad idea on so many
> levels. I think you need to rethink your schema, irrespective of whether
> CDBI handles them.
> 
> In the latter case, I suspect that it's perl's interpretation of '0' as a
> false value that is tripping you up. This is likely to happen regardless
> of the abstraction layer that you use.
> 
> As the doctor said, don't do that then.
> 
> Simon.
> 

You could also try CDBI::Plugin::Backtickify.

d.

Re: Class::DBI does not support numeric column names
David Baird 18:25 on 21 Jun 2005

Generated at 16:38 on 28 Jul 2005 by mariachi v0.52