How to overwrite next rows using UPDATE?
I have this MYSQL table (simplified version) with some erased ids:
+-----+-------+---------+
| id | name | country |
+-----+-------+---------+
| 1 | John | England |
| 5 | Emily | USA |
| 9 | Joe | USA |
| 11 |Michael| USA |
| 13 | Liam | USA |
+-----+-------+---------+
How do I overwrite each row from "John" using php? (last name "Liam" gets kicked out)
I want it to look like this:
+-----+-------+---------+
| id | name | country |
+-----+-------+---------+
| 1 | John | England |
| 5 | John | USA |
| 9 | Emily | USA |
| 11 | Joe | USA |
| 13 |Michael| USA |
+-----+-------+---------+
from Recent Questions - Stack Overflow https://ift.tt/3hp9Fxj
https://ift.tt/eA8V8J
Comments
Post a Comment