-1
$keyword = $_POST['searchKeywords'];

$query = mysqli_query($con, "SELECT * FROM movie WHERE title LIKE '%$keyword%' LIMIT 5");

I'm getting $keyword from the input field via POST request.And I have to type the accurate title like 'The Order' with the same case sensitive So I should type the exact way it is.Is there any way to type with any case sensitive I want like 'the order' and get the result.I will appreciate your help thanks.

  • 1
    Does this answer your question? [How can I search (case-insensitive) in a column using LIKE wildcard?](https://stackoverflow.com/questions/2876789/how-can-i-search-case-insensitive-in-a-column-using-like-wildcard) – caramba May 25 '21 at 11:04

2 Answers2

2

In MySQL string comparison can be case sensitive or case insensitive. This normally depends on the collation used not on operator (where, like).

Read how case sensitivity works

Lenin Sheikh
  • 291
  • 4
  • 4
0

i think you can apply that function first on the keyword variable before you use it

strtolower("Hello WORLD.");

you will get it as: hellow world.