[PYTHON] MySQL insert into ...

Discussion in 'Programming' started by thesurface, Dec 26, 2014.

  1. #1
    So i have some code and how i can add into it mysql insert ?

    class Master(object):

    def log(self, infohash, address=None):
    stdger.debug("%s|%s:%s" % (infohash.encode("hex"), address[0], address[1]))
    fileger.debug('%s|%s:%s' % (infohash.encode('hex').upper(),address[0],address[1]))

    //here i need have mysql code to insert infohash.encode("hex") and address[0] into mysql database

    if __name__ == "__main__":
    #max_node_qsize bigger, bandwith bigger, spped higher
    initialLog()
    threads = []
     
    thesurface, Dec 26, 2014 IP
  2. Anveto

    Anveto Well-Known Member

    Messages:
    697
    Likes Received:
    40
    Best Answers:
    19
    Trophy Points:
    195
    #2
    Anveto, Dec 26, 2014 IP