Search code examples
zend-frameworkzend-dbzend-db-table

Zend DB Table: All Values are Strings


I am using Zend DB Table and DB Table Row. When I get a row object for any of my tables, I see that the types have all been changed to strings, even the auto-incrementing primary key.

Is that normal? Do I need to explicitly define the schema to get around this? (I thought I'd read all the Zend DB documentation. Can't recall anything about this though.)


Solution

  • As Zend_Db uses PDO for most connections, you're always going to get strings back from a SELECT query.

    See http://www.php.net/manual/en/pdostatement.fetchcolumn.php