随机countRows错误?

So I'm coming up with this error, and it is:

Fatal error: Call to a member function countRows() on a non-object in 
              C:\xampp\htdocsesults.php on line 22

But it is weird, because on line 22 it is:

$find = strip_tags ( $find );

Lines 20-30:

        $find = strtolower ( $find );
        $find = strip_tags ( $find );
        $find = trim ( $find );

        $results = mysql_query ( "SELECT * FROM users WHERE type='$type' AND 
                                 price='$price' AND name='$name'" );

        while ( $rows = mysql_fetch_array ( $results ) ) {

                echo "<table>";
                "<tr>";

Anyone mind helping?