MYSql, CGI web page search code not working

Fred fredg at fastmail.fm
Sat Jan 28 13:30:56 EST 2006


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...




More information about the Python-list mailing list