Skip to content

Commit

Permalink
First pull
Browse files Browse the repository at this point in the history
  • Loading branch information
miladbarooni committed Jan 24, 2020
2 parents ee90ac6 + ccae5c3 commit 17cdcb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Binary file modified __pycache__/snapFood.cpython-37.pyc
Binary file not shown.
10 changes: 8 additions & 2 deletions snapFood.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ def deletAddress(self, address_id):
self._mycursor.execute("DELETE FROM ADDRESS WHERE addressid = \'{}\';".format(address_id))
self._mydb.commit()

def updateAddress(self, x = None, y = None, city_id = None, street = None, alley = None, plaque = None, address_text = None):
data = self.showAddress(address_id)
if x == None:
return


def searchShopByLocation(self, address_id, radius):
self._mycursor.execute("SELECT * FROM LOCATION WHERE ADDRESSaddressid = \'{}\';".format(address_id))
data = self._mycursor.fetchall()
Expand Down Expand Up @@ -197,7 +203,7 @@ def showBuyHistory(self, user_id): #NOT CHECKED
JOIN STATUS ON STATUSstatusid = statusid)
JOIN ADDRESS ON ADDRESSaddressid = addressid)
JOIN WALLET ON WALLETwalletid = walletid)
JOIN USER ON WALLET.walletid = USER.WALLETwalletid WHERE USER.userid = \'{}\' AND STATUS.name = \'Completed\'".format(user_id))
JOIN USER ON WALLET.walletid = USER.WALLETwalletid WHERE USER.userid = \'{}\' AND STATUS.name = \'Completed\';""".format(user_id))
return self._mycursor.fetchall()

def addComment(self, invoic_id, rate, text = None): #NOT CHECKED
Expand All @@ -209,7 +215,7 @@ def addComment(self, invoic_id, rate, text = None): #NOT CHECKED

def showFoods(self, food_ids): #NOT CHECKED
"""
food_ids in a list
food_ids is a list
"""
sql = "SELECT * FROM FOOD WHERE foodid IN ("
lst = ""
Expand Down

0 comments on commit 17cdcb8

Please sign in to comment.