#! /usr/bin/env python
#coding=utf-8
import MySQLdb
try:
conn=MySQLdb.connect(host='localhost',user='root',passwd='123456',port=3306)
cur=conn.cursor()
conn.select_db('test')
count=cur.execute('select id from jmter')
print 'there has %s rows record' % count
#count=cur.execute('select id from jmter')
print '=='*10
cur.scroll(0,mode='absolute')
results=cur.fetchall()
#
print results[1][0];
for r in results:
print r[0]
cur.close()
conn.close()
except MySQLdb.Error,e:
print "Mysql Error %d: %s" % (e.args[0], e.args[1])