#!/usr/bin/python3
'''List all states in the DB'''
import MySQLdb
import sys
argv = sys.argv

if (__name__ == "__main__"):
    user = argv[1]
    passwd = argv[2]
    db_name = argv[3]
    state = argv[4]

    db = MySQLdb.connect(host="localhost", port=3306, user=user,
                         passwd=passwd, db=db_name, charset="utf8")
    cursor = db.cursor()
    querry = ("SELECT * FROM states WHERE name LIKE BINARY '" +
              "{}".format(state) + "' ORDER BY id")
    cursor.execute(querry)
    res = cursor.fetchall()
    for item in res:
        print(item)
    cursor.close()
    db.close()

8250d0f16adb3736ecde9e223e32ce1660426f5e
<mask token>

<mask token>
if __name__ == '__main__':
    user = argv[1]
    passwd = argv[2]
    db_name = argv[3]
    state = argv[4]
    db = MySQLdb.connect(host='localhost', port=3306, user=user, passwd=
        passwd, db=db_name, charset='utf8')
    cursor = db.cursor()
    querry = "SELECT * FROM states WHERE name LIKE BINARY '" + '{}'.format(
        state) + "' ORDER BY id"
    cursor.execute(querry)
    res = cursor.fetchall()
    for item in res:
        print(item)
    cursor.close()
    db.close()

<mask token>
argv = sys.argv
if __name__ == '__main__':
    user = argv[1]
    passwd = argv[2]
    db_name = argv[3]
    state = argv[4]
    db = MySQLdb.connect(host='localhost', port=3306, user=user, passwd=
        passwd, db=db_name, charset='utf8')
    cursor = db.cursor()
    querry = "SELECT * FROM states WHERE name LIKE BINARY '" + '{}'.format(
        state) + "' ORDER BY id"
    cursor.execute(querry)
    res = cursor.fetchall()
    for item in res:
        print(item)
    cursor.close()
    db.close()

<mask token>
import MySQLdb
import sys
argv = sys.argv
if __name__ == '__main__':
    user = argv[1]
    passwd = argv[2]
    db_name = argv[3]
    state = argv[4]
    db = MySQLdb.connect(host='localhost', port=3306, user=user, passwd=
        passwd, db=db_name, charset='utf8')
    cursor = db.cursor()
    querry = "SELECT * FROM states WHERE name LIKE BINARY '" + '{}'.format(
        state) + "' ORDER BY id"
    cursor.execute(querry)
    res = cursor.fetchall()
    for item in res:
        print(item)
    cursor.close()
    db.close()

#!/usr/bin/python3
'''List all states in the DB'''
import MySQLdb
import sys
argv = sys.argv

if (__name__ == "__main__"):
    user = argv[1]
    passwd = argv[2]
    db_name = argv[3]
    state = argv[4]

    db = MySQLdb.connect(host="localhost", port=3306, user=user,
                         passwd=passwd, db=db_name, charset="utf8")
    cursor = db.cursor()
    querry = ("SELECT * FROM states WHERE name LIKE BINARY '" +
              "{}".format(state) + "' ORDER BY id")
    cursor.execute(querry)
    res = cursor.fetchall()
    for item in res:
        print(item)
    cursor.close()
    db.close()
