yatirsql degiskenlerini if lerin icine alip dene bence. update kodlari if icinde olmadigindan once ilki calisiyor.