ok, i have my code layed out very differently. What i am trying to accomplish is my sql code takes the last 10 rows from the db and echo's certain fields. That is the easy part. Here comes the hard part.
here is my code..
$con = mysql_connect();
$db = mysql_select_db();
$sql = "SELECT * FROM db ORDER BY id DESC";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$fields .='$row['field'];
}
That part was easy. Now here comes the problem. According to the code i just wrote you would think it would display all the last 10 rows of the db.
But $fields wont work unless we echo it.. Well i have to put it in my code first.. and here is how my code works.
I have a html.inc page which ouses start_html($output); function. So for everypage that i have content on i have to set it in $ouput = "";
So i am doing this.
$output = "".$fields."";
But it will not display the last 10 rows.. it is like it wont loop.
If you have any ideas without changing the way i use $output (becuase i have 15 pages coded with that) please help me.
Thank you
Anthony.