Forum » Programiranje » Python SQLAlchemy: stored procedura + parameter
Python SQLAlchemy: stored procedura + parameter
HotBurek ::
Evo, če kdo potrebuje, kako klicat MySql proceduro s parametrom.
#!/usr/bin/python3.5 # import import sqlalchemy; sqlhost = "mysql://root:test@localhost:3306/httptree?autocommit=true&use_unicode=True&charset=utf8"; engine = sqlalchemy.create_engine(sqlhost); ses = "20190119152018667518"; sessionid = engine.execute("CALL `httptree`.`spGetIdForSid`(%(session)s)", {"session":ses}).scalar(); print("sessionid=" + str(sessionid));
root@debian:/# iptraf-ng
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
fatal: This program requires a screen size of at least 80 columns by 24 lines
Please resize your window
Vredno ogleda ...
Tema | Ogledi | Zadnje sporočilo | |
---|---|---|---|
Tema | Ogledi | Zadnje sporočilo | |
» | [SQL] Referenca na parameter v proceduriOddelek: Programiranje | 1384 (1097) | Ahim |
» | Postavitev mySQLOddelek: Programiranje | 2231 (1809) | M01O |
» | python in postgresql (strani: 1 2 )Oddelek: Programiranje | 7505 (6406) | ZaphodBB |
» | Pomoč pri izdelavi Python skripte (strani: 1 2 )Oddelek: Programiranje | 5817 (4463) | BigWhale |
» | [php] štetje prijavljenih uporabnikov!Oddelek: Izdelava spletišč | 1387 (1124) | Brilko |