I want to store the record the GPIO PIN of Raspberry 3 when it become High
python code
Mysql Table

Error
What's wrong happening here ?
python code
Code:
from time import sleep
import RPi.GPIO as GPIO
import mysql.connector
import datetime
import time
import string
Device1_ID = 1256
GPIO.setmode(GPIO.BCM)
INPUT_PIN = 21
stamp = datetime.datetime.now()
GPIO.setup(INPUT_PIN, GPIO.IN)
db = mysql.connector.connect(user='vajra', password='vajra123',
host='192.168.0.102',
database='pin')
# Create a Cursor object to execute queries.
cur = db.cursor()
# Select data from table using SQL query.
cur.execute("SELECT * FROM status")
for row in cur:
print('%r' % (row,))
# Start a loop that never ends
while True:
if (GPIO.input(INPUT_PIN) == True):
print('PIN_High')
Pin_status = 'PIN High'
cur.execute("""INSERT INTO status (Device1, pin1, sentime) values (%s, %s, %s)""",(Device1_ID, Pin_status, stamp))
cur.execute('SELECT * from status')
db.commit()
time.sleep(2)
else:
print('PIN_Low')
status = 'PIN Low'

Error
Code:
mysql.connector.errors.DatabaseError: 1366 (HY000): Incorrect integer value: 'PIN High' for column 'pin1' at row 1