Hello,
A script returned the error:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /mnt/w0512/d14/s35/b02604cc/www/smphp_web/build-init/userend/read.php on line 6
I do not know what this means, could anyone explain this?

    The sql query is (begins next line)
    $sql =
    "select * from letters order by time desc limit 1";
    $rs = @( $sql );
    while ($row = mysql_fetch_array( $rs ))
    {
    ?>
    <table border="1" width="375">
    <tr>
    <td><b>From:</b><?php echo $row["From"]; ?></td>
    <hr>
    <td><b>Subject:</b><?php echo $row["subject"]; ?></td>
    <hr>
    <td><b>Message:</b><?php echo $row["message"]; ?></td>
    </table>
    <?php } ?>

      sealMail... What is different from the code that's giving the error mysql_fetch_row() and this script you posted which uses mysql_fetch_array()? Are you sure you're posting the correct script? Also, it may help if you post a table structure here because that could be contributing to the problem...

      Basically, it means your query can't be processed by mysql properly...

      Change to:

      $rs = @mysql_query( $sql ) or die(mysql_error());
      

      And let's see if this spits out the error...

        A different error appeared this time:
        Connected to MySQL
        Connected to DatabaseUnknown column 'time' in 'order clause'

        Also, I am certain I have the correct script, earlier today I had switched between mysql_fetch_array() and mysql_fetch_row() to see if it would make a difference.

          What the error is saying is that there is no column named "time". That's why you're getting the mysql error. Check your column names in the table. If you're positive it's correct, then post your table structure here...

            Write a Reply...