NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Portable quoting? (Score:1)
or in longer form ...
giving you the correct quoting character for the database (assuming the driver supports it)
There is a good reason to always quote (Score:1)
Many databases have field names that are deliberately case insensitive. Depending on the database you're liable to get your field names back in either upper or lower case. Which one you get depends on the database you have.
If you quote your field names then you will always get them back in the case you sent them as. This is much more convenient for an automated system.
Re: (Score:1)
Re: (Score:1)
And now the framework has to translate from the canonical case back to the original case that the programmer specified and is expecting. (Ruby is case sensitive, just like Perl is.)
While there are other ways to work around it, the simplest way is just to quote the field name and watch problems disappear on you.
Careful about the case! (Score:2)
So you may have to change "order" to "ORDER" to get the same case for both quoted and unquoted column names.
Bookmark reserved-word-named column info (Score:1)
This is good to know. I am commenting here
so I can find it later.