Secondly, how would you convert integers outside of PHP-supported
bounds?
And would you also covert timestamps to DateTime (or even Zend_Date)?
Etc...
Also, I don't know if table metadata is always available, for example
when not using Zend_Db_Table. And what would you do when user just
does $db->query("SELECT 1") or some other query which doesn't map
directly to table columns?
But most importantly, _WHY_ would you? :)
PHP is a loosely typed language and stuff like this is done
automagically for you. Think about all the times you get integers from
HTTP requests and never worry about them being strings.
Sent from my iPhone
On Feb 25, 2009, at 0:40, Vince42 <zf@vineal.de> wrote:
> Hi,
>
> Jaka Jančar schrieb:
>> I can't imagine how this could happen. Can you provide an example
>> table and selects?
>
> This is really odd ... i just removed all the type casts - and now it
> works. Three seems no problem with the quoting anymore - great. :)
>
> But the point remains: the fetched values should be converted as the
> meta data of the database table specifies the data type and it
> shouldn't
> be a big deal to implement such a functionality - or would it?
>
> --
> Cheers, \\|//
> Vince (o o)
> ----------------------------ooO-(_)-Ooo-------------------------
> ''' (o)_(o) [ ][0][ ]
> ô¿ô (=°o°=) World Domination by Copy and Paste [ ][ ][0]
> - (")_(") [0][0][0]
>
> () ascii ribbon campaign - against html e-mail
> /\ www.asciiribbon.org - against proprietary attachments
> Ooo.
> ---------------------------.ooO----( )-------------------------
> ( ) (_/
> \_)
>
>
没有评论:
发表评论