[Solar-talk] Fetch Error

Kilbride, James P. James.Kilbride at gd-ais.com
Wed Feb 13 07:55:19 CST 2008


We've talked about this before. We often don't have control over tables
developed by other applications but may have to interface with them.
Uppercase letters in names is a must for any useful interface to a
database. Solar can not afford to assume the developers will always be
able to do lower case. I thought this had been changed previously to
allow upper case names after previous questions about this from Darwin.

James Kilbride

-----Original Message-----
From: solar-talk-bounces at lists.solarphp.com
[mailto:solar-talk-bounces at lists.solarphp.com] On Behalf Of Rodrigo
Moraes
Sent: Wednesday, February 13, 2008 8:48 AM
To: solar-talk at lists.solarphp.com
Subject: Re: [Solar-talk] Fetch Error

On Feb 13, 2008 11:27 AM, Kilbride, James P.:
> What is ERR_IDENTIFIER_CHARS mean?

It seems that Solar_Sql_Adapter disallows uppercase in table/column
names. This is around line 1960 - method _checkIdentifier():

        // only a-z, 0-9, and _ are allowed in words.
        // must start with a letter, not a number or underscore.
        $regex = '/^[a-z][a-z0-9_]*$/';
        if (! preg_match($regex, $name)) {

You can change the regex to allow uppercase:

        $regex = '/^[a-zA-Z][a-zA-Z0-9_]*$/';

But I'd recommend that you stick with *all* lowercase for your names.

-- rodrigo
_______________________________________________
Solar-talk mailing list
Solar-talk at lists.solarphp.com
http://mailman-mail3.webfaction.com/listinfo/solar-talk



More information about the Solar-talk mailing list