[dev] [cvs] commit: turba/lib Driver.php api.php turba/lib/Driver sql.php
Michael Rubinsky
mike at theupstairsroom.com
Mon Oct 29 17:23:26 UTC 2007
Quoting Jan Schneider <jan at horde.org>:
> Zitat von Michael Rubinsky <mike at theupstairsroom.com>:
>
>> Quoting Jan Schneider <jan at horde.org>:
>>
>>> Zitat von Michael Rubinsky <mike at theupstairsroom.com>:
>>>
>>>> Quoting Jan Schneider <jan at horde.org>:
>>>>
>>>>> jan 2007-10-29 11:21:28 EDT
>>>>>
>>>>> Modified files:
>>>>> lib Driver.php api.php
>>>>> lib/Driver sql.php
>>>>> Log:
>>>>> Catch errors.
>>>>> Fix query generation.
>>>>> Use ANSI SQL (works fine with DATE columns in MySQL too btw).
>>>>> Simplify code.
>>>>
>>>>
>>>> I was under the impression that not all RDBMS actually implemented the
>>>> ANSI version of the substring() command. In particular (at least some
>>>> versions of) MS SQL implement it in the (string, from, to) kind of way.
>>>
>>> That sucks. Does that mean that not all RDMBS implement the ANSI
>>> version, but all implement a non-standard version that works
>>> everywhere the same? I wonder what standards are for.
>>
>> Yea, what we need are better standards for implementing standards :)
>> Anyway, the substr() version was the only one that I found that works
>> the same across the different servers I checked the manual for. MS
>> SQL and Oracle (at least according to the text I have here at home)
>> both do not implenet the substring() function. I think MS SQL aliases
>> substring() to substr(), but it still only accepts the (string, from,
>> to) parameters. MySQL I believe accepts both versions. PostgreSQL
>> accepts the ANSI form, but translates it the substr() function with
>> the three parameters...and DB2 takes the three parameters as
>> well...but I don't remember if it also take the ANSI version.
>
> Okay, I'm gonna revert this then. Do you know if at least all substr()
> implementations consider the third parameter as the substring length,
> opposed to the substring end? I would feel more confident if we could
> make sure to really compare 5-character substrings against 5-character
> string constants.
I believe that they were. The len parameter was also optional in all
of them IIRC as well.
>
> Jan.
>
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
> !DSPAM:472611f238781976510932!
>
Thanks,
mike
--
The Horde Project (www.horde.org)
mrubinsk at horde.org
"Time just hates me. That's why it made me an adult." - Josh Joplin
More information about the dev
mailing list