2015-07-05 21:21:18 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
from db import *
|
|
|
|
# Start an SQL session
|
|
|
|
session=Session()
|
|
|
|
# Let's find all users with a negative credit
|
|
|
|
slabbedasker=session.query(User).filter(User.credit<0).all()
|
|
|
|
|
|
|
|
for slubbert in slabbedasker:
|
2018-08-23 13:15:45 +02:00
|
|
|
print(f"{slubbert.name}, {slubbert.credit}")
|