cmd_connection1 = ("mysql -uuser -ppw -h127.0.0.1 mydatabase -s"
" -N -e \'select * from mytable where ID=\""+ID+"\";\'")
Using Python 2.4, I want to check if there is any result(as a row)
I used :
if not line1 :
...
if line1 == "Empty" :
...
But there is no result.
A working example I use every day.
Im using mysql connector:
You can download from:
https://dev.mysql.com/downloads/connector/python/
You should use python 3