954,206 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how do i solve the below error

Warning: mysql_fetch_assoc(): 3 is not a valid MySQL result resource in C:\Inetpub\wwwroot\BMF\Web\news.php on line 63

Records 1 to 2 of 2

<table width="355" height="50" border="0" align="left">
  <tr>
    <td><strong>Date</strong></td>
    <td><strong>Subject</strong></td>
  </tr>
  <?php do { ?>
  <tr>
    <td> <a href="details.php?recordID=<?php echo $row_news['id']; ?>"> <?php echo $row_news['date']; ?>&nbsp; </a> </td>
    <td> <?php echo $row_news['subject']; ?>&nbsp; </td>
  </tr>
  <?php } while ($row_news = mysql_fetch_assoc($news)); ?> //line 63
</table>
dumisibanda
Newbie Poster
2 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

That most likely means your query failed. You need to verify your query is correct. Echo it out to the screen and run it from the command line or echo out mysql_error() to see what the problem is.

stymiee
He's No Good To Me Dead
Moderator
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
 

i tried what you told me and i get a

Resource id #5
dumisibanda
Newbie Poster
2 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

That's your connection ID, not your query.

stymiee
He's No Good To Me Dead
Moderator
3,360 posts since May 2006
Reputation Points: 161
Solved Threads: 38
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You