mysql_fetch问题......我疯了

I'm sorry, probably somewhere there will be the answer to my question, but it's hours I'm looking for trying to resolve this problem: Here is the code:

    <?php
    $con = mysql_connect("****","****","***");
    if (!$con)
      {
      die('Could not connect: ' . mysql_error());
      }

        mysql_select_db("******", $con);

    $query = "SELECT id FROM fq_questions";
    $rowcnt = mysql_num_rows(mysql_query($query));      
    echo "Tot scenes: ".$rowcnt;
    $id = rand (1,$rowcnt);
    echo "<br>Id rand: ".$id."<br>";    
flush();
    $newquery = "SELECT question FROM fq_questions WHERE id=".$id;
    $result = mysql_query($newquery);
    if (!$result) {
        $message  = 'Invalid query: ' . mysql_error() . "
";
        $message .= 'Whole query: ' . $newquery;
        die($message);
    }

    $row = mysql_fetch_assoc($result);
    echo $row['question'];

    mysql_close($con);
    ?>

The problem is that there is no output. I've tried everything, seems to be a problem into the query, but there is a result, it's not false, but even if it exists, nothing is outputted. The code works till

    echo "<br>Id rand: ".$id."<br>";    

then it shows nothing. It's a dummy problem, i'm getting crazy just because of it.

Uh, was forgetting... The website where I've got the problem: http://www.freelabs.it/filmquiz/game.php

"desc" is a MySQL reserved word, you should just change that column name in your DB. Anyway, your method is not random at all, and it will fail as soon as you have a "hole" in your ids (when you delete one member).

Take a look at MySQL "ORDER BY RAND()"

$data = mysql_query("SELECT description FROM fq_questions ORDER BY RAND() LIMIT 1");

Be careful, desc is a SQL keyword ! Your query may not compile because of that.

You used mysql_fetch_row() which returns a numerical array. You then try to access the array slot named 'desc'.
It doesn't exist. (My guess is that that produces a supressed error, preventing any output from showing up, or a supressed warning, preventing any output after that line from showing up.)
Try changing mysql_fetch_row() to mysql_fetch_assoc() (still DEPRECATED!) and that should be solved.

Sources: http://php.net/manual/en/function.mysql-fetch-row.php
And: http://php.net/manual/en/function.mysql-fetch-assoc.php