A table has the following fields (among others)
kundetype enum('normal', 'reseller') utf8_bin
When searching for a record using the search window and using the primary key nr only, the following statement was generated
SELECT * FROM `kunder` WHERE `nr` = 415 AND `kundetype` = 'null'
It should have been
SELECT * FROM `kunder` WHERE `nr` = 415'