Monk3h Posted April 30, 2008 Share Posted April 30, 2008 I have made a small PHP log syetm. The problem is i want it to display the last 15 logs. and it displays the first 15. How would i edit my script to do what i want? $lsel = mysql_query("SELECT * FROM `tlog` WHERE `owner` = '$stat[tribe]' ORDER BY `id` DESC LIMIT 15"); if($lsel){ while($arr = mysql_fetch_assoc($lsel)){ extract($arr); echo "<table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td width='4%'></td> <td width='92%'>$log</td> <td width='4%'></td> </tr> </table>"; } }else{ die("Unable to connect to database. ".mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/103571-php-log/ Share on other sites More sharing options...
soycharliente Posted April 30, 2008 Share Posted April 30, 2008 $lsel = mysql_query("SELECT * FROM `tlog` WHERE `owner` = '{$stat['tribe']}' ORDER BY `id` ASC LIMIT 15"); Link to comment https://forums.phpfreaks.com/topic/103571-php-log/#findComment-530345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.