Guest User

Untitled

a guest
Nov 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. def SQLBridge(command, isQuery=True):
  2. with fdb.connect(dsn=<Path>, user=<user>, password=<password, charset="UTF8") as con:
  3. cur = con.cursor()
  4. cur.execute(command)
  5.  
  6. if isQuery:
  7. result = cur.fetchall()
  8.  
  9. else:
  10. con.commit()
  11. cur.close()
  12. con.close()
  13. return result
  14.  
  15. SQLBridge("select list(lastcode, ',') from customer where objid in (select customer from saletable)")[0]
Add Comment
Please, Sign In to add comment