Resource Id error caused by 1 line of coding. Can you help?
Posted: Mon Jul 19, 2010 2:35 pm
Not the best with PHP, so I'm sure you immediately see the problem here.
Everything works, but I get a Resource Id error for the statement I placed within the { } 's.
Everything works, but I get a Resource Id error for the statement I placed within the { } 's.
Code: Select all
$result = mysql_query("SELECT * FROM status ORDER BY Date desc LIMIT 0, 3");
while($row = mysql_fetch_array($result))
{
$test = $row['User'];
$statusname = mysql_query("SELECT Screenname FROM sau WHERE Id=$test");
echo $statusname;
echo "<div id=\"status-feed-main\"><div id=\"user-pic\"></div><div id=\"status-title\">" . $row['User'] . " says: " . $row['Status'] . "<br /><br /></div>";
echo "<div id=\"status-date\">" . date("l jS F Y, g:i A", strtotime($row['Date'])) . "</div>";
echo "</div>";
}