文字の先頭から姓または名字を検索する必要があります。たとえば、firstnameはMichael、lastnameはJordanです。 "dan"または "hae"の単語を検索すると結果が返されません。 "mic"または "jor"を検索した場合にのみ、firstnameとlastnameが一緒に返されます。 mysqlでこれを行う方法はありますか?PHPとMYSQLの姓または名字の最初の文字から検索
私の次のコードは私が期待しているものを返しません。
select * from users where (firstname like '%$searchWord%' or lastname like '%$searchWord%')
@PhiterFernandes絶対にありません! – RiggsFolly