[Maypole] Problem with unusual column names

Nic Gibson nicg@noslogan.org
Fri, 6 Aug 2004 09:23:42 +0100


On 6 Aug 2004, at 08:37, Sai Nelson Tong wrote:

> I am trying to use Maypole to display data from a table wich unusual
> column names such as, for examlpe:  p-m-abc   or o-/m-/2,5

This is, sadly, not a problem with Maypole. It might be considered to 
be a
problem to Class::DBI I suppose but... basically this is due to your 
column
names being  'nonstandard'.

It's fairly hard to deal with this in a consistent way since the 
quoting and
escaping of 'odd' column names is very much non-standard. The 
appropriate
part of the mysql manual is:

http://dev.mysql.com/doc/mysql/en/Legal_names.html

Basically your column name is being interpreted as "p minus - m minus
abc".

I'd suggest taking this to the Class::DBI list itself

sorry not to be of more help

nic

>
> Then Maypole will give the following error when enter the url to
> 'list' the content of the table:
>
> undef error - DBD::mysql::st execute failed: Unknown column 'p' in
> 'field list' [for Statement "SELECT ......."] at
> /usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 57.
>
> I am using mysql to store the data and the column name is intact
> inside the database.  Is there any way  to get around this problem
> without having to do any compromise such as changing the unusual names
> of the columns in order to allow Maypole to display the data in the
> table?
>
> S. Tong
>
> _______________________________________________
> maypole mailing list
> maypole@lists.netthink.co.uk
> http://lists.netthink.co.uk/listinfo/maypole