少年阿賓

          那些青春的歲月

            BlogJava :: 首頁 :: 聯系 :: 聚合  :: 管理
            500 Posts :: 0 Stories :: 135 Comments :: 0 Trackbacks

          常用鏈接

          留言簿(22)

          我參與的團隊

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          import MySQLdb
          import time
          try:
              conn=MySQLdb.connect(host='localhost',user='root',passwd='',db='abin',port=3306)
              cur=conn.cursor()
              result=cur.execute('select * from tabin')
              print result
              print '-------'
              info=cur.fetchmany(result)
              for ii in info:
                  currentTime = time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
                  values=[ii[1],currentTime]
                  cur.execute('insert into sabin (name,create_time) values (%s,%s)',values)
                  print '===='
              cur.close()
              conn.commit()
              conn.close()
          except MySQLdb.Error,e:
              print "Mysql Error %d: %s % ()e.args[0],e.args[1]"



          import urllib
          params = urllib.urlencode({'type':'mobile','parameter':'13521502037','pageNum':1,'pageSize':10})
          conn = urllib.urlopen("http://test.qunar.com:7400/complaints/find.action",params);
          result = conn.read()
          print result
          posted on 2015-01-28 11:57 abin 閱讀(424) 評論(0)  編輯  收藏 所屬分類: python

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 蛟河市| 南城县| 巩义市| 邮箱| 普定县| 泰安市| 斗六市| 淄博市| 古蔺县| 三亚市| 天全县| 湘阴县| 双柏县| 金川县| 德阳市| 抚州市| 鄂托克旗| 本溪市| 昌图县| 昂仁县| 韶关市| 冀州市| 波密县| 舟山市| 新干县| 巴楚县| 静安区| 南开区| 青州市| 黄龙县| 海林市| 通江县| 崇文区| 响水县| 安化县| 灵川县| 林周县| 鲁甸县| 旺苍县| 咸阳市| 通海县|