On 5/8/2014 7:13 AM, Kleiner Werner wrote:
a PHP script stores an amount into a SQLite table column "salary" which is 
defined as float(10,0)
I a user fill in 50000 into a textfield, this value is stored as 5000.0

Why this? why not 50000 ?

sqlite> create table t(x float(10,0));
sqlite> insert into t(x) values ('50000');
sqlite> select * from t;
50000.0

The problem lies elsewhere, outside of SQLite. Check the part of your program that takes a value from the textbox and passes it along to the SQL statement - you are losing a character somewhere along the way.
--
Igor Tandetnik

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

Reply via email to