>  I am trying to search and display the results , even
> if we  give a part of the email_id 


>        entry.execute("""SELECT * FROM contact WHERE
> email_id  =  %s """, (s_email,))


If you want to do partial matches you will need to use LIKE

'''
SELECT * FROM contact 
WHERE email_id LIKE %s
'''

Using = will only check for an exact match, and as you show 
that works OK.

HTH,

Alan G
Author of the learn to program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to