When I run an sql query using the ZF wrappers, all the numeric values return as strings. What do I need to change so the values will return in the same data type as they are in
For an example of using a custom Zend_Db_Table_Row
to get correct data types, as Bill Karwin suggested, have a look at the class here: http://www.zfsnippets.com/snippets/view/id/70
It can be implemented in your model as:
class YourTableName extends Zend_Db_Table_Abstract
{
protected $_name = 'your_table_name';
protected $_rowClass = 'Model_Row_Abstract';
}
You may want to change Model_Row_Abstract
's datatype for tinyint
to bool
if you use it strictly to hold boolean values.