How to turn on backquotes
[prev]
[thread]
[next]
[Date index for 2005/05/20]
Is there any way to automatically surround column names with backquotes? I'm
using Maypole on a database where some of the columns are reserved words
(this is in MySQL). So I get errors like this:
DBD::mysql::st execute failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to
use near ' form_field_class, multiple, form_field_id
FROM Attributes
WHERE record_num='' at line 1 [for Statement "SELECT defaults, rows, cols,
size, form_field_type, required, default_value, friendly_name, labels,
maxlength, attribute_type, owning_subclass, dfv_constraint_name, sort_order,
values, form_field_class, multiple, form_field_id
FROM Attributes
WHERE record_num=?
"] at /usr/local/lib/perl5/site_perl/5.8.6/DBIx/ContextualFetch.pm line 51.
In this case, 'values' is a reserved word, but the statement runs fine if the
column names are backquoted. I'm sure there's a switch somewhere that turns
this on.
Thanks,
d.
|
How to turn on backquotes
David Baird 22:49 on 20 May 2005
|