If the column affinity is integer, then anything that can be represented using 
integers will be stored that way (ie, 50000, 50000.0 '50000', '50000.0').  
Things that are numbers but cannot be stored as integers (because they need a 
fractional part) will be stored as floats (50000.1, '50000.1').  If you specify 
a column affinity of float, all numbers (even things that could be stored as 
integers) will be stored as floats.

In either case, things which are not numbers, such as the string 'Hello 
World!', are stored as text,

>-----Original Message-----
>From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
>boun...@sqlite.org] On Behalf Of Werner Kleiner
>Sent: Thursday, 8 May, 2014 07:01
>To: sqlite-users@sqlite.org
>Subject: Re: [sqlite] Storing amount?
>
>>SQLite does not understand column types like "numeric(10,0)".  It has
>only
>two number types: INTEGER and >REAL.
>
>So if the column is datatype REAL and you will store amount 50000, SQLite
>results in 5000.0 ?
>Why not 50000.0 ?
>
>And if the columns datatype is REAL, you need a helper tool or script
>which
>adds the ".0" at the end of the amount at PHP server side, if the <form>
>textfield only allows numbers for salary. ?
>(if you want to store the correct value)
>
>regards
>Werner
>
>
>
>--
>View this message in context:
>http://sqlite.1065341.n5.nabble.com/Storing-amount-tp75527p75533.html
>Sent from the SQLite mailing list archive at Nabble.com.
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@sqlite.org
>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to