You are using the INSERT , not the UPDATE . As others have stated, this will insert the record, not update it.
There are 4 basic operations for simple SQL queries:
- SELECT: used to view data.
JOIN , set the WHERE , etc. to control the presentation of the data. This is the safest operation (although a bad SELECT can bring server performance to the knees). - INSERT: Insert a row into a table. This is pretty safe as it does not modify any existing data.
- UPDATE: this will update one or more rows in the table. The main thing to worry about is the
WHERE . If you do not enable it, you will update each row in the table. Usually you want to test the WHERE in the SELECT to make sure that you only update the rows you want to update. - REMOVAL: This is naturally the most dangerous. Again, without a
WHERE it will delete all rows in the table. Check your WHERE to make sure that you only delete the rows you want to delete.
From the look of your INSERT it seems like you're trying to update a row based on a key (number 4). Based on the absence of error, this is not really the key. If it were a table key, it would return an error stating that you cannot insert a row with a duplicate key.
It seems (based on limited information in the question, of course) that you want it to be something like:
UPDATE table SET column = 'five' WHERE id = 4
More information can be found here , among many other places.
David source share