The reason for the different results is that your first injection cuts off the rest of the query via the comment (
Your last injection likely returns nothing because it is invalid and causes an error (because of the unclosed
The query in which you are injecting likely has a structure like this:
... WHERE foo='your input' OR bar='something else'
It doesn't have to be exactly like this, but we do know that there has to be something after the point in which you are injecting.
Of course, theoretically it could also be that the search legitimately returns those results and there is no injection at all (in this case it's unlikely though). You should try other injections as well, such as
' and '1'='1,
' and sleep(10)-- -, actually extracting data, etc.