[eluser]CroNiX[/eluser]
That error message does not mean it didn't find any rows. "on a non-object" means that $Q is not a db object, so num_rows() method doesn't exist for it.
Not sure why you're getting the error, but I'd advise you to escape your variable, or just use active record so it does it for you. I'd start with wherever you are calling that method from.
percent 3C is an encoded < (less than) symbol