PEATSA/WebApp/Data.py
def addImageData(self, data, name):
	
		'''Adds the image data to the database calling it name'''
		
		if not self.exists():
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification

		values =  (self.identification, name, MySQLdb.escape_string(data), len(data), len(data), MySQLdb.escape_string(data))
		statement = """INSERT INTO Images (JobID, Name, Content, Size) VALUES ('%s', '%s', '%s', '%d') ON DUPLICATE KEY UPDATE Size='%d', Content='%s'""" % values
		self.cursor.execute(statement)
		self.connection.commit()
Adds the image data to the database calling it name
Adds the image data to the database calling it name
Adds the image data to the database calling it name
def addImageData(self, data, name):
		if not self.exists():
			raise Exceptions.DatabaseRetrievalError, "Job Id %s does not exist in the database" % self.identification
		values =  (self.identification, name, MySQLdb.escape_string(data), len(data), len(data), MySQLdb.escape_string(data))
		statement = """INSERT INTO Images (JobID, Name, Content, Size) VALUES ('%s', '%s', '%s', '%d') ON DUPLICATE KEY UPDATE Size='%d', Content='%s'""" % values
		self.cursor.execute(statement)
		self.connection.commit()
def addImageData ( self , data , name ) : if not self . exists ( ) : raise Exceptions . DatabaseRetrievalError , "Job Id %s does not exist in the database" % self . identification values = ( self . identification , name , MySQLdb . escape_string ( data ) , len ( data ) , len ( data ) , MySQLdb . escape_string ( data ) ) statement = """INSERT INTO Images (JobID, Name, Content, Size) VALUES ('%s', '%s', '%s', '%d') ON DUPLICATE KEY UPDATE Size='%d', Content='%s'""" % values self . cursor . execute ( statement ) self . connection . commit ( )
Adds the image data to the database calling it name
Adds the image data to the database calling it name
'''Adds the image data to the database calling it name'''
self
data
name