INSERT UPDATE process not working

Category Image 101

I have a snippet that inserts data in a row in a MySql database. If that data already exists the existing row should be updated. In my case, I continue to get insert only. What is wrong with this snippet?