Hello,

I'm a fairly new programmer and trying to get some code working, that just doesn't want to work so came for some advice. Basically I'm having this search for a specific user_id. If it exists it should update the row. If it doesn't exist it should insert a new row with the appropriate data.

It appears to work for creating new rows. However, it never updates even if the row is there. I tested the update lines of...