mysql match string with start of string in table
LIKE
can be avoided, by truncating the comparison string to each value's length:
... WHERE LEFT('abffagpokejfkjs', LENGTH(value)) = value
Try this:
SELECT col1, col2 -- etc...
FROM your_table
WHERE 'abffagpokejfkjs' LIKE CONCAT(value, '%')
Note that this will not use an index effectively so it will be slow if you have a lot of records.
Also note that some characters in value
(e.g. %
) may be interpreted by LIKE as having a special meaning, which may undesirable.