2008年8月21日星期四

[fw-db] Zend_Db and NULL values

Is it just me?  It seems like the Zend_Db classes and gateways do not handle NULL values very well (or at all).   All databases differentiate between NULL and ''.  For select, save, find, create, and other various methods, how does everyone handle NULL values?  In my opinion, it would be nice if these were handled by the classes.

array('key' => NULL) should be valid and should be different than array('key' => '')

        $a = array();
        $a['key'] = NULL;
        $a['key2'] = '';
        Zend_Debug::Dump($a);

If I'm out to lunch, somebody please enlighten me and point me in the right direction.  :-)

Any help is appreciated.

Arthur

没有评论: