okay here's what i have atm:
frm_assistencia.ComboBox_cl_idcliente.dbItemID := SqlExecute('SELECT IFNULL(id, -1)id FROM cliente WHERE ((nome like "%'+nome+'%") and (contacto2 like "%'+contacto2+'%") and (contacto1 like "%'+contacto1+'%"))');
in this situation, i have several edit boxes that i can type whatever i want in them, and the sql will indeed search for each and every possibility trying to figure out it's nº1 best guess.
But if i have a (null) entry on sql , for instance, if only one contact is avaiable, with this syntax i am not able to get the search to work.
the only other way to do this is to create multiple sql execute commands, one for each edit box. something i'm trying to avoid to keep this database simple and effective