How can I search for a column named fullname by filtering on firstname/lastname without specific order?
In the following Javascript example, the query is invalid when searching by lastname:
function getQuery(searchWord){
return `SELECT * FROM user WHERE fullname like '%${searchWord}%' `
}
// trying to search fullname "Elon Musk"
getQuery("Elon M") // okay
getQuery("Musk E") // no result
What query can I use to find "Elon Musk" by searching the keyword "Musk Elon"?
NB: columns firstname and lastname also exist