Write a program to fetch all the value from table using ‘where’ clause.

import MySQLdb

db=MySQLdb.connect(‘localhost’,’pardeep’,’pardeep321′,’temp’)
curs=db.cursor()

print ‘input the name for search : ‘
#a = raw_input()
sql = (“select*from employee where INCOME=’20000′”)

curs.execute(sql)

fet = curs.fetchall()

for row in fet:
print row