I have a sql table like this,
+-------+-------+-----+
| name | start | end |
+-------+-------+-----+
| Joe | 14 | - |
| Joe | 13 | - |
| Steve | 11 | - |
| Steve | 15 | - |
| Bruce | 10 | - |
+-------+-------+-----+
and i want to update the values for column “end” with the values from “start” for each unique column value “name”, so it looks like this.
+-------+-------+-----+
| name | start | end |
+-------+-------+-----+
| Joe | 14 | 14 |
| Joe | 13 | 13 |
| Steve | 11 | 11 |
| Steve | 15 | 15 |
| Bruce | 10 | 10 |
+-------+-------+-----+
my question is: how do i do this in SQL code, and how would it look like with a PHP mysql query?