Are you sure there are no spaces, or other trash-characters, surrounding either you search keyword or the data in the database. (You can use trim() to remove such characters from your variables)
What exactly is the code field?
Could you show us a the data you have in your database? (A couple of rows would be fine.)
Comment