查询在phpmyadmin中工作,但不在页面上

I have tried all kinds of things and spent hours doing this and would really like it if someone can tell me what I'm doing.

This is my SQL query: SELECT * FROM txp_file WHERE filename LIKE '%Fast®%' OR description LIKE '%Fast®%'

In phpmyadmin, this brings back the results I want. On the page, the query apparently works but gets no result. I have tried to use substring to omit the special trademark symbol, I have tried a million different variations but I get no result. Here is my php code:

$sql = "SELECT * FROM txp_file WHERE filename LIKE '%$querytitle%' OR description LIKE '%$querytitle%'";
$query = mysql_query($sql) or die(mysql_error());
$result = mysql_fetch_array($query);
if ($result){
    echo "<a href='#'>$querytitle</a>";
}
else
    echo 'nil';

The connection to the database is already there so I don't need to do it again in this case. Can anyone find anything wrong with this code?

P.S. $querytitle is a global variable. I have echoed it and it comes up just the way it should.

You probably haven't set the character set for the connection. Use the command:

SET NAMES utf8;

or whatever character set you are using. To find the default character set of the database and the connection you can execute this command:

USE yourdb;
SHOW VARIABLES LIKE "%coll%";

It will show you a list of collations for the server, the database and the connection.