DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

data type in select

Open m-jackson opened this issue 8 years ago • 1 comments
trafficstars

Hi, why when i select integer value from mysql table i got a string. for example select id from table => id = "33"; i need int, not string. before vresion 037 all was good.

m-jackson avatar May 12 '17 13:05 m-jackson

Do you have a reproducible example with the old version? How are you determining you are receiving an "int" or a "string"? As far as Perl is concerned any scalar can be both.

I have always received integer columns as stringy values from DBD::mysql, and this is desired to avoid cases where it returns a number that would not be exactly represented in perl in numeric form, and precision would be lost.

Grinnz avatar May 12 '17 14:05 Grinnz