Dan Sommers wrote: > Let the DB-API do more work for you: > > cursor = connection.cursor( ) > sql = """SELECT column2, columns3 FROM table WHERE name LIKE %s""" > values = ('%%%s%%' % searchterm,) # note that this is a tuple
It looks like this might be a rare case where not using the % operator might make it easier to see what's going on: values = ('%' + searchterm + '%',) -Peter -- http://mail.python.org/mailman/listinfo/python-list