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()); } Quote Link to comment 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"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.