Update with PHP and MYSQL division

Asked

Viewed 74 times

0

How do I make a UPDATE for all users of a database?
For example:

UPDATE usuarios 
SET juros=investimento + investimento * 30 /100
WHERE id='89'

The bank will take the investment data and add 30%, but if I take the WHERE to add this value to all other users appears the following error:

Mysql Message: Documentation

#1292 - Truncated wrong DOUBLE value: ''

  • Removing "Where" to change all records from the table works yes, this error is related to something else. An example that returns this error is to compare values of unusual types such as Double and String, you are sure that these types are correct?

  • How’s that column in the database ?

  • some investimento should be blank; you can check if this is true?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.