#NEWLINE# def get_version_id_from_version_number( self , version ) : #NEWLINE# #INDENT# db = self . __mysql_connect ( ) #NEWLINE# cursor = db . cursor ( ) #NEWLINE# cursor . execute ( ( "select id from %s where version = '%s' order by id desc;" % ( self . __version_table , version ) ) ) #NEWLINE# result = cursor . fetchone ( ) #NEWLINE# _id = ( ( result and int ( result [ 0 ] ) ) or None ) #NEWLINE# cursor . close ( ) #NEWLINE# db . close ( ) #NEWLINE# return _id