Fred wrote: > OK one more... how would I do a "LIKE" instead of a = in this code? > > cursor.execute("Select * from phone where name=%s order by name", > (form['name'].value,)) > > Right off I think: > > cursor.execute("Select * from phone where name like %%s% order by > name", > (form['name'].value,)) > > But it blows up... >
This should work: cursor.execute("Select * from phone where name like %s order by name", ('%'+form['name'].value+'%',)) -Kirk McDonald -- http://mail.python.org/mailman/listinfo/python-list