'MYSQL update query returns zero line while same select query provides result (search field IS NULL)
I want to update lines with testing 2 fields. When I proceed a select query, I can see the concerned records:
SELECT * FROM `t_journal` WHERE Type IS NULL and Mouvement < 0
But when I use the same filter on an UPDATE query, MYSQL return zero line :
UPDATE t_journal SET Type = "Entree" WHERE Type IS NULL AND Mouvement < 0
I tried on a local copy of my table in MAMP with Mysql 5.7.32 (PHPMyAdmin) and also live on Ubuntu server with MYSQL 5.5.62 ... same result.
EDIT When I simulate the query this shows this result
SQL query:
UPDATE t_journal SET Type = "Entree" WHERE Type is null AND Mouvement < 0
Matched rows: 0
What am I doing a wrong ?
EDIT 2:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

