inconsistent case folding

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

inconsistent case folding

Greg Donald
Anyone know why CASE_FOLDING seems to only work in one direction?

I have

$options = array(
    Zend_Db::CASE_FOLDING => Zend_Db::CASE_LOWER
);

And I'm using the PDO driver the docs say is required for case folding:

$db = new Zend_Db_Adapter_Pdo_Oci( array(
  'username' => $config->db->username,
  'password' => $config->db->password,
  'dbname'   => $config->db->dbname,
  'host'     => $config->db->host,
  'port'     => $config->db->port,
  'options'  => $options
));

So then

$select->from( $stats, array( 'count' ) )

doesn't work, but

$select->from( $stats, array( 'COUNT' ) )

does work.  Why the inconsistent behaviour?


--
Greg Donald
http://destiney.com/
Reply | Threaded
Open this post in threaded view
|

Re: inconsistent case folding

Josh Team
Use MySQL :) haha, just kidding. I don't know about CASE_FOLDING as I do use MySQLi but I do know all Zend_Framework classes are easily extended for extra functionality needs.

On Thu, Apr 24, 2008 at 1:12 PM, Greg Donald <[hidden email]> wrote:
Anyone know why CASE_FOLDING seems to only work in one direction?

I have

$options = array(
   Zend_Db::CASE_FOLDING => Zend_Db::CASE_LOWER
);

And I'm using the PDO driver the docs say is required for case folding:

$db = new Zend_Db_Adapter_Pdo_Oci( array(
 'username' => $config->db->username,
 'password' => $config->db->password,
 'dbname'   => $config->db->dbname,
 'host'     => $config->db->host,
 'port'     => $config->db->port,
 'options'  => $options
));

So then

$select->from( $stats, array( 'count' ) )

doesn't work, but

$select->from( $stats, array( 'COUNT' ) )

does work.  Why the inconsistent behaviour?


--
Greg Donald
http://destiney.com/

Reply | Threaded
Open this post in threaded view
|

Re: inconsistent case folding

Greg Donald
On Thu, Apr 24, 2008 at 3:30 PM, Josh Team <[hidden email]> wrote:
> I do know all Zend_Framework classes are easily extended for
> extra functionality needs.

In this particular instance I don't need "extra" functionality.  I
just need the existing functionaility to work consistently.


--
Greg Donald
http://destiney.com/
Reply | Threaded
Open this post in threaded view
|

Re: inconsistent case folding

Darby Felton
In reply to this post by Greg Donald
Hi Greg,

Zend_Db_Adapter_Pdo_Oci is not quite bug-free, and it's likely that the
behavior you describe is simply a bug. Please feel free to create an
issue in the issue tracker so that we can track this problem to resolution:

http://framework.zend.com/issues/secure/CreateIssue!default.jspa

If you are interested in contributing a fix for this or other parts of
Zend Framework, it's really quite easy to get started:

http://framework.zend.com/community/contribute

Truly, you've already begun contributing by providing this feedback;
thanks for the report! :)

Best regards,
Darby

Greg Donald wrote:

> Anyone know why CASE_FOLDING seems to only work in one direction?
>
> I have
>
> $options = array(
>     Zend_Db::CASE_FOLDING => Zend_Db::CASE_LOWER
> );
>
> And I'm using the PDO driver the docs say is required for case folding:
>
> $db = new Zend_Db_Adapter_Pdo_Oci( array(
>   'username' => $config->db->username,
>   'password' => $config->db->password,
>   'dbname'   => $config->db->dbname,
>   'host'     => $config->db->host,
>   'port'     => $config->db->port,
>   'options'  => $options
> ));
>
> So then
>
> $select->from( $stats, array( 'count' ) )
>
> doesn't work, but
>
> $select->from( $stats, array( 'COUNT' ) )
>
> does work.  Why the inconsistent behaviour?
>
>