I would need to see the table setup of course but it should be as simple as the following:
// include db connection
$r = @mysql_query("select * from table_name order by id desc limit 50");
$reta = array();
while($rw = @mysql_fetch_array($r)){
$reta[] = $rw;
}
foreach($reta as $newguy){
// print out row
}
// i simplified the mysql db for simplicity here. You really should use a db abstraction layer (OOP)
|