PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Submissions (http://www.phpdig.net/forum/forumdisplay.php?f=24)
-   -   Clear logs from admin panel (http://www.phpdig.net/forum/showthread.php?t=568)

manfred 02-24-2004 06:39 AM

Clear logs from admin panel
 
1 Attachment(s)
Here is mod to clear logs from admin panel and also log status is displayed. This is done because logs were left even after the hole site was deleted! Try it and send a comment.

Installation: just unzip to your PhpDig folder and open admin panel.

Note that this is only for 1.8.0 version of PhpDig!

-m-

alivin70 02-25-2004 05:18 AM

Hi,
thank you for your code.

Why you do this:
PHP Code:

$query "SELECT l_id FROM ".PHPDIG_DB_PREFIX."logs";
$id mysql_query($query,$id_connect);
while (list(
$key_id) = mysql_fetch_row($id))
       {
           
$query_delete "DELETE FROM ".PHPDIG_DB_PREFIX."logs WHERE l_id=$key_id";
           
$id_del mysql_query($query_delete,$id_connect);
           
$del++;
       } 

why not a simpler:
PHP Code:

$query_delete "DELETE FROM ".PHPDIG_DB_PREFIX."logs";
           
$id_del mysql_query($query_delete,$id_connect);
$del mysql_affected_rows($id_connect); 

thanks
Alivin70

manfred 02-25-2004 06:15 AM

I'm not very familiar with SQL syntax (yet) and if you compare that to clean_keywords.php there is a match!

Copy&paste is too easy solution - I know ;) but hey it works!

-m-


All times are GMT -8. The time now is 12:57 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.