Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.)

like image 712
DatsunBing Avatar asked Feb 01 '26 02:02

DatsunBing


1 Answers

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

like image 80
Phil Avatar answered Feb 03 '26 01:02

Phil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!