I've created the query below as a filter command. But it only works on integer fields. It seems whenever the field is a string it does not work...
The error i keep getting is 'SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'like'%a%''at line 1'
My Code is as follows:
datalive.mail_queue.SQL.Text:='select*from mail_queue where user_id=:user_id and '+fieldname+' like :value';
Addparam(datalive.mail_queue,'user_id',ftString,inttostr(user_id));
Addparam(datalive.mail_queue,'fieldname',ftString,fieldname);
Addparam(datalive.mail_queue,'value',ftString,'%'+edit1.Text+'%');
datalive.mail_queue.Active:=true;