Ok. I'm running a check on a database...of news that I have. The problem is, I want the LAST entries to print out first. So, what I did is do a select that ran the entries backwards by sorting by id descending. The problem comes when it's printing the for loop, on the 5th entry and beyond, it begins to print out this error:
Warning: MySQL: Bad field offset in /var/lib/apache/htdocs/phpscripts/index.php on line 99
But why is it printing that error if it's still printing the value of that field? I'm a tad confused. Can someone please help me?
Below is the code that I have. For those of you who know what's going on, it should be that hard to follow.
//Check on num of rows for the "for" loop...
$news_query = "SELECT * FROM news ORDER BY news_id DESC";
$news_result = mysql_db_query($DB,news_query)
$num_rows = mysql_num_rows($news_result);
//For query to run the latest 10 news posts
for( $i = 0; $i <= ($num_rows) - 1; ++$i )
{
$news_row = mysql_fetch_array$news_result);
mysql_fetch_field($news_result, $i);
?>