Jump to content

PHP Log


Monk3h

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.