We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db.zip
변경/추가 부분
-Register.py
self.petName = None
def insertUserData(self, user_key, serial, email): self.openDB() self.curs = self.conn.cursor()
if self.checkRegistedUser(user_key) == True: return exception.REGISTERD_USER try: if self.checkRegistedSerial(serial) == False: return exception.NO_REGISTERD_SERIAL self.curs.execute(insert.userTable(user_key,serial, email, self.petName)) self.conn.commit() self.closeDB() return message.SUCESS_IST_USER except: self.closeDB() return exception.DONT_REGIST
def getPetName(self, user_key): self.openDB() self.curs = self.conn.cursor()
try: self.curs.execute(select.petNameByUserKey(user_key)) rows = self.curs.fetchone() result = " ".join(rows) print(result) self.closeDB() self.petName = result return result except: self.closeDB() return exception.FAIL_TO_SELECT
-delete.py def oldimagelistByAddr
-select.py def oldimagelistByAddr
def checkoldimagelistByAddr(self, addr): self.curs = self.conn.cursor() try: self.curs.execute(select.oldimagelistByAddr(addr)) rows = self.curs.fetchall() if len(rows) > 0: return True else : return False except: return False def insertoldimagelist(self, addr, serial): self.openDB() self.curs = self.conn.cursor() if self.checkRegistedSerial(serial) == False: return exception.NO_REGISTERD_SERIAL try: self.curs.execute(insert.oldimagelistTable(addr, serial)) self.conn.commit() self.closeDB() return message.SUCESS_IST_OLD_IMAGE except: self.closeDB() return exception.FAIL_TO_IST_OLD_IMAGE def deleteoldimagelist(self, addr): self.openDB() self.curs = self.conn.cursor() if self.checkoldimagelistByAddr(addr) == False: return False try: self.curs.execute(delete.oldimagelistByAddr(addr)) self.conn.commit() self.closeDB() return True except: return False def getoldimagelistFromSerial(self, serial): self.openDB() self.curs = self.conn.cursor() if self.checkRegistedSerial(serial) == False: return exception.NO_REGISTERD_SERIAL try: self.curs.execute(select.pathBySerial(serial)) rows = self.curs.fetchall() image_list = [] for row in rows: print(row[0]) image_list.append(row[0]) self.closeDB() return image_list except: self.closeDB() return exception.SELECT_FROM_CHECKING_SERIAL
3.home system -select.py def petCountBySerial(serial): return "select * from %s where %s.serial = "%s";" %( util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, serial)
-update.py def petCountBySerial(serial): return "UPDATE %s SET %s WHERE %s.serial = '%s';" %( util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, serial)
def getPetCountFromSerial(self,serial): self.openDB() self.curs = self.conn.cursor() if self.checkRegistedSerial(serial) == False: self.closeDB() return exception.NO_REGISTERD_SERIAL try: #petCNT = self.curs.execute(select.petCountBySerial(serial)) petCNT = 0 self.closeDB() print("petCount was deleted") return petCNT except: self.closeDB() return -1 def updatePetCount(self, user_key): self.openDB() self.curs = self.conn.cursor() try: self.curs.execute(select.userSerialByUserKey(user_key)) rows = self.curs.fetchall() if len(rows) <= 0: return False serial = rows[0][0] if self.checkRegistedSerial(serial=serial) == False: return False print(update.petCountBySerial(serial=serial)) self.curs.execute(update.petCountBySerial(serial=serial)) self.conn.commit() self.closeDB() return True except: self.closeDB() return False
The text was updated successfully, but these errors were encountered:
flask.zip
Sorry, something went wrong.
https://github.com/kuj0210/Smart-mobile/blob/master/SMS1011.zip
ras120
No branches or pull requests
db.zip
변경/추가 부분
-Register.py
self.petName = None
def insertUserData(self, user_key, serial, email):
self.openDB()
self.curs = self.conn.cursor()
def getPetName(self, user_key):
self.openDB()
self.curs = self.conn.cursor()
-delete.py
def oldimagelistByAddr
-select.py
def oldimagelistByAddr
-Register.py
3.home system
-select.py
def petCountBySerial(serial):
return "select * from %s where %s.serial = "%s";" %(
util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, serial)
-update.py
def petCountBySerial(serial):
return "UPDATE %s SET %s WHERE %s.serial = '%s';" %(
util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, util.SERIAL_TABLE_NAME, serial)
-Register.py
The text was updated successfully, but these errors were encountered: