Re: select decimal column from mysql
[email protected] (john miky) Mon, 20 Dec 2021 14:28:12 +0800
| Newsgroups | perl.dbi.users |
|---|---|
| Message-ID | <CACbameHtY91SpOejEx=ci=Yia-9uQ4CegR-01qjrY=Ci11xR9g@mail.gmail.com> |
--000000000000e2890205d38dfe22 Content-Type: text/plain; charset="UTF-8" sorry, please ignore this stupid question, 0.015 is > 0 On Mon, Dec 20, 2021 at 2:19 PM john miky <[email protected]> wrote: > hmm. it is perl's "problem", not dbi. > > On Mon, Dec 20, 2021 at 1:20 PM john miky <[email protected]> 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 proper way to get a float value ? >> > --000000000000e2890205d38dfe22 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">sorry, please ignore this stupid question, 0.015 is > 0= <br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_at= tr">On Mon, Dec 20, 2021 at 2:19 PM john miky <<a href=3D"mailto:gb2313@= gmail.com">[email protected]</a>> wrote:<br></div><blockquote class=3D"gm= ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,= 204,204);padding-left:1ex"><div dir=3D"ltr">hmm. it is perl's "pro= blem", not dbi.<br></div><br><div class=3D"gmail_quote"><div dir=3D"lt= r" class=3D"gmail_attr">On Mon, Dec 20, 2021 at 1:20 PM john miky <<a hr= ef=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>> w= rote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p= x 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir= =3D"ltr"><div>hi,</div><div><br></div><div>I select a decimal column, from = mysql with dbi,</div><div>the value 0.015 for example,=C2=A0 my ($v) =3D $d= bh->selectrow_array("select price from test limit 1")<br></div= ><div>it is greater than 0 in perl.</div><div><br></div><div>What's the= proper way to get a float value ?<br></div></div> </blockquote></div> </blockquote></div> --000000000000e2890205d38dfe22--