title: Using if statement with database in python
body: <pre><code>veri = sqlite3.connect('IBCKayıt')
  v = veri.cursor()
  
  v.execute(&quot;SELECT numsıra FROM kayıtlar WHERE EXISTS(SELECT * FROM kayıtlar WHERE numsıra)&quot;)
  record = v.fetchall()
  
  if numaraentry.get() in record:
      messagebox.showinfo(&quot;UYARI&quot;,&quot;Bu IBC Zaten Var&quot;)
  
  if numaraentry.get() not in record:
      v.execute(&quot;INSERT INTO kayıtlar VALUES (:numsıra, :koruyucutarih, :numunedurumm, :kullandurumm)&quot;,
          {'numsıra':numaraentry.get(),
           'koruyucutarih':tarıhgırıs,
           'numunedurumm':secılmıs1.get(),
           'kullandurumm':secılmıs.get()
          })
      messagebox.showinfo(&quot;UYARI&quot;,&quot;Kayıt İşlemi Başarılı.&quot;)
  
  
  veri.commit()
  veri.close()
  </code></pre>
  <p>I want it to give a warning when the same data is entered, but when I enter the same data, it does not give a warning. What do you think is the solution?</p>
  <p>-I'm new to the form, I guess I don't know how to open a topic, sorry.</p>