View Single Post
Old 06-08-2008, 01:40 AM  
Nookster
Confirmed IT Professional
 
Industry Role:
Join Date: Nov 2005
Location: Hollywood, CA
Posts: 3,744
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)
Nookster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote