- Is there a way for Pages to display an auto-updating date in ordinal format?
- Question mark folder on startup, how can I recover?
- the_title() filter is also applied in menu title
- Paginate links repeating value in links
- How to add ajax loading icon after click add to cart button on woocommerce
- lazy load for blog post content
- Bash compound substring expansion
- Squid proxy with negative speed increase
- Installing Kali 2018.2 on Raspberry Pi Zero W
- gnome-shell error log
- How does ssh handle 2 computers on the local network with the same username?
- Why can't I ping my Centos7 VM running on VMPlayer?
- Running local shell script on multiple remote server in parallel and get the status
- Filter separated paragraphs according to their first word?
- Why is ls -i slower than ls?
- What are the pros & cons of removing login screen on app launch?
- Erupted in violence
- Using prepositions and conjunctions in a sentence
- Use of 'in pair' or 'in group' in a sentence
- What is the idiom 'what more could one ask for' in American English?
How to upload data from raspberry pi to mySQL, geting errors
Basically i am trying to upload the data collected from my raspberry pi to mysql, I have a table called DHT_data with columns 'datetime' using datatype timestamp, 'temp' using datatype numeric, 'hum' using datatype numeric as well. However using my python script shown below i keep getting errors like indentation error or syntax error. I am currently new to programming so i don't really know whats the problem. Would appreciate any help in finding the solution or rectifying any errors with the script since i am not sure if it works yet
from time import sleep
DHTpin = 4
db = MySQLdb.connect("localhost", "root", "dmitiot", "IOTassignmentBobo")
curs = db.cursor()
print("Successfully connected to database!")
print("Error connecting to mySQL database")
update = True
humidity, temperature = Adafruit_DHT.read_retry(11, DHTpin)
if humidity is not None and temp