Am I right that the "LIKE" keyword trims whitespaces from a word for exmaple if I do: "SELECT * FROM myTable WHERE description LIKE '% pet %'" it will be consider the same as "SELECT * FROM myTable WHERE description LIKE '%pet%' " If I am right what do I do about it?
It will not be the same. If you do not need the whitespace, you need to add trim($var) for the string that you want to search on. %pet% will return everything that has pet % pet % will return every record where there is ' pet ' (with space) is present