hi,
i have a problem. i cannot insert a float value in a mysql tablecolumn
FLOAT
Loading development environment.
Tax.create(:name=>‘mwst’, :descr=>‘MwSt. 16%’, :rate=>0.16)
ActiveRecord::StatementInvalid: Mysql::Error: Column count doesn’t
match value count at row 1: INSERT INTO taxes (name,descr,
updated_at,rate,created_at) VALUES(‘mwst’, ‘MwSt. 16%’,
‘2006-06-22 15:58:07’, 0,16, ‘2006-06-22 15:58:07’)
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
log' from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:185:inexecute’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/mysql_adapter.rb:195:in
insert' [...]save’
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:408:in
`create’
in the insert statement 0.16 is converted to an invalid 0,16
how can i stop that? i’m sure i’m missing something…
regards,
robert