捐赠人表:
我用这段代码来计算年龄
def getnumbers():
x = input("Enter the X number: ")
y = input("Enter the Y number: ")
return x, y
def checknumbers():
if x > y:
print(f'x is larger then y: x is {x} and y is {y}')
elif y > x:
print(f"y is larger then x: x is {x} and y is {y}")
elif y == x:
print(f"x is equal to y: x is {x} and y is {y}")
else:
print("Dont know mate")
n = 0
while(n < 3):
getnumbers()
checknumbers()
n += 1
我使用了此触发器:
select TIMESTAMPDIFF(YEAR, Dbirth, NOW()) AS age FROM Donors;
我的问题是如何同时使用触发器和TIMESTAMPDIFF