Login

Snippets by bernie2004

Snippet List

get next mysql autoincrement value

i use this to get the pk of a record before creation, in my scenario to name an uploaded image: def UPLOADTO( i,n ): if not i.id: id = get_nextautoincrement( i.__class__ ) else: id = i.id return str(id)+'.jpg'

  • mysql
  • autoincrement
Read More

bernie2004 has posted 1 snippet.