@perl.org
Subject: RE: [EXTERNAL] Re: select decimal column from mysql
Variables in perl are “untyped” or better yet “dynamically typed”.
Every variable is a string but will behave like a int or float in the right
context.
Conversions from string to int to float and back to string happen
ohn miky
Sent: Monday, December 20, 2021 1:28 AM
To: dbi-users@perl.org
Subject: [EXTERNAL] Re: select decimal column from mysql
sorry, please ignore this stupid question, 0.015 is > 0
On Mon, Dec 20, 2021 at 2:19 PM john miky <mailto:gb2...@gmail.com> wrote:
hmm. it is perl's "pro
sorry, please ignore this stupid question, 0.015 is > 0
On Mon, Dec 20, 2021 at 2:19 PM john miky wrote:
> hmm. it is perl's "problem", not dbi.
>
> On Mon, Dec 20, 2021 at 1:20 PM john miky wrote:
>
>> hi,
>>
>> I select a decimal column, from mysql with dbi,
>> the value 0.015 for example,
hmm. it is perl's "problem", not dbi.
On Mon, Dec 20, 2021 at 1:20 PM john miky wrote:
> hi,
>
> I select a decimal column, from mysql with dbi,
> the value 0.015 for example, my ($v) = $dbh->selectrow_array("select
> price from test limit 1")
> it is greater than 0 in perl.
>
> What's the
hi,
I select a decimal column, from mysql with dbi,
the value 0.015 for example, my ($v) = $dbh->selectrow_array("select price
from test limit 1")
it is greater than 0 in perl.
What's the proper way to get a float value ?