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