Displaying data limit list
Posted: Thu Jul 13, 2006 3:58 pm
aarrghhh im goin mad, php is very long when you dont know alot.
ok i have that, I am trying to display the last 5 titles added to the database. Only one title is appearing on the page. I think im missing something to make it show 5.
anyone help me out
Code: Select all
<?php
$content=mysql_query("select * from mos_content ORDER BY `id` DESC LIMIT 0,5") or die(mysql_error());
while ($donnee = mysql_fetch_array($content))
{ $title= $donnee['title'];
}
?>
<?php
echo $title;
echo "</br>";
?>ok i have that, I am trying to display the last 5 titles added to the database. Only one title is appearing on the page. I think im missing something to make it show 5.
anyone help me out