fenderocker
07-24-2006, 06:50 PM
it doesn't output the message and date variables, only the part that says "Posted on : " and "News : " and the "<br />"s. Help! I know that I could connect to the db correctly! also I don't get the could not query message!
$result = mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 0 , 10") OR die("Could not query.");
while ($row = mysql_fetch_object($result)) {
echo "Posted on : ";
echo $row['date'];
echo "<br />";
echo "News : ";
echo $row['message'];
echo "<br /><br />";
}
$result = mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 0 , 10") OR die("Could not query.");
while ($row = mysql_fetch_object($result)) {
echo "Posted on : ";
echo $row['date'];
echo "<br />";
echo "News : ";
echo $row['message'];
echo "<br /><br />";
}