I am wondering if there is a way to find and delete from a mysql table that begins with a certain string.
$string = 'abc'
and in mysql table there is a column 'name'
name
=====
abc
abcdef
abc123
aewfabc
aabc
When I run the code, it should delete three rows 'abc', 'abcdef', and 'abcd123'.
Is there a way to do this? I am not sure if there is a mysql query option to do this.. or should I implement strpos() some how?
finding and deleting string match in mysql
Moderator: General Moderators
Re: finding and deleting string match in mysql
I think I found answer myself using "LIKE '%John'" but if there is a better way please let me know!