I have record with strings:
record id value type
sn 1 aaaa181c1c3e9997 single
sn 2 caca381c1c3e6483 masculine
These are almost 500+,they are stored in mysql which i fetch,converting record to 64bit(bitcout work only integer),they are returned as all queires stored,not most like.I use code:
SELECT * FROM MY_TABLE ORDER BY BIT_COUNT(CAST(CONV(record,16,10) as unsigned integer) ^ CAST(CONV('$submit', 16, 10) AS UNSIGNED) ) LIMIT 1;
It is working fine,requirement is suppose supplied value is aaaa181c1c3e9997,then it display all queries whether it match or not.I just want to fetch only it matches more than 15%,else don't fetch anyone.Please help what i'm missing. I also used like:
SELECT * FROM MY_TABLE ORDER BY BIT_COUNT(CAST(CONV(record,16,10) as unsigned integer) ^ CAST(CONV('$submit', 16, 10) AS UNSIGNED) ) < 15;