Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 SQlite3 quickly increment INT value?
#1
Is there a slick +=1 for INT values in an SQLite3 table?

For example, a table named 'users'
name, gamesplayed
a suedo code example of what I'm looking for would be.
c.execute(FROM users WHERE name=? SET gamesplayed=? ,("Gary", gamesplayed+=1))
Quote
#2
c.execute('UPDATE users SET gamesplayed = gamesplayed + 1 WHERE name = ?', ['Gary'])
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How can I increment a List item with in a "for in" msteffes 4 722 Aug-14-2019, 08:55 AM
Last Post: DeaD_EyE
  How define iteration interval increment SriMekala 5 770 Jun-01-2019, 01:06 PM
Last Post: ichabod801
  increment variable in while loop Naito 3 704 Jan-20-2019, 12:30 PM
Last Post: Naito
  auto increment ambush 7 3,370 Nov-02-2018, 10:52 PM
Last Post: LeSchakal
  how to increment all file names in a folder SoulsKeeper 5 1,931 Sep-10-2018, 07:59 PM
Last Post: Skaperen
  Auto increment in Python Sqlite3 kingram 1 7,055 Sep-15-2017, 12:15 AM
Last Post: Larz60+
  code to increment ip address Keerthi 2 5,881 Feb-14-2017, 12:06 PM
Last Post: Larz60+

Forum Jump:


Users browsing this thread: 1 Guest(s)