* * * * *
I still contend it's the bloody PHP programmers …
Sad.
Sad that the easiest way to fix The Error From Hell [1] was to use a search-
and-replace function to “fix” the SQL (Structured Query Language) query [2].
Sigh.
-----[ PHP ]-----
$sql = preg_replace("/\s+\'\s+\'\s+([a-z]+)/"," ' ' AS \\1",$sql);
-----[ END OF LINE ]-----
It's not perfect. It'll break if there's an SQL statement with a lowercase
AS. But it'll have to do for now until I find a better regular expression.
To top it all off, I received the following from someone who has worked on
porting SugarCRM [3] to PostgreSQL [4]:
> The SugarFolk, I think due to rather obtuse source management and
> procedural policies, aren't interested in folding in my many improvements
> and PostgreSQL support. I moved on to other employment having nothing at
> all to do with SugarCRM or PHP (and very little to do with PostgreSQL), so
> I haven't worked on it. So it's officially dormant.
>
Sigh.
[1]
gopher://gopher.conman.org/0Phlog:2007/12/17.1
[2]
gopher://gopher.conman.org/0Phlog:2007/12/17.2
[3]
http://www.sugarcrm.com/
[4]
http://www.postgresql.org/
Email author at
[email protected]