select decimal column from mysql

john miky <[email protected]> Mon, 20 Dec 2021 13:20:46 +0800
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <CACbameGJaS=6uL2U=uaRtJnmPFRbVKk6vQsGNE-h5GUC0js1wQ@mail.gmail.com>
--000000000000bce52805d38d0d06
Content-Type: text/plain; charset="UTF-8"

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 ?

--000000000000bce52805d38d0d06
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>hi,</div><div><br></div><div>I select a decimal colum=
n, from mysql with dbi,</div><div>the value 0.015 for example,=C2=A0 my ($v=
) =3D $dbh-&gt;selectrow_array(&quot;select price from test limit 1&quot;)<=
br></div><div>it is greater than 0 in perl.</div><div><br></div><div>What&#=
39;s the proper way to get a float value ?<br></div></div>

--000000000000bce52805d38d0d06--