R
R
Relapse2017-09-19 13:49:47
MySQL
Relapse, 2017-09-19 13:49:47

How to solve the UPDATE problem for a float field?

There is a request:

UPDATE `teasers_images` SET `status` = 'on' WHERE `ctr` <= '0.4'

which does not update the required values ​​(writes "0 rows affected.").
As far as I understand there is some problem with float (field type ctr is float).
At the same time, SELECT on this query is successfully executed and returns the result.
Tell me how to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2017-09-19
@Sanasol

Maybe you shouldn't do it as a string? Why quotation marks?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question