Hi Folks,
I am trying to query a database using this command:
// code
$query = "Input from text field";
$result = ("SELECT id FROM table_name WHERE title LIKE '$query' ");
// end code
This works great with one issue. The string "art" will return Bart, or smart (anything with the string 'art' in it) but "arts" will not. I assume because the ending 's' is not in the string. I could just tear off any 's' from the query string but what if someone querys 'octopuses'? It will not return octopus.
I hope this makes sense. Thanks in advance!
🙂