Icy Phoenix

     
 


Post new topic  This topic is locked: you cannot edit posts or make replies. 
Page 1 of 1
 
 
Reply with quote Download Post 
Post Ezstats Mod 
 
I have installed this mod Ezstats Mod , and everything seems to be working fine, the mod is really nice with daily graphic measurement for unique visitors visit to your site as you can see how the mod looks like here in my forum:
http://tinhthienthu.ath.cx/ezstats.php


But some how there is slightly a small problem involved to the mod that after installed the mod, when i search for users in my forum in PM or in Group CP, i got this error message:
Code: [Download] [Hide]
  1. Could not update Eazystats table  
  2.  
  3. DEBUG MODE  
  4.  
  5. SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' username = '', user_level = , user_allow_viewonline = WHERE ip = '6' at line 3  
  6.  
  7. UPDATE phpbb_ezstats SET stamp = 1165263542, user_id = , username = '', user_level = , user_allow_viewonline = WHERE ip = '69.238.117.146' LIMIT 1  
  8.  
  9. Line : 88  
  10. File : ezstats.php  
  11.  


except that small error tho mod is working great in my forum, and so does any one figure out what might be the cause of the error from the mod to the search users function ?
 



 
LeonSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Ezstats Mod 
 
Hi, try this and let me know

Open:

includes/ezstats.php

Find:

Code: [Download] [Hide] [Select]
// If IP exists, do update. Else, do insert.
//
if ( $row = $db->sql_fetchrow($result) )
{
   $sql = "UPDATE " . EZSTATS_TABLE . "
      SET stamp = " . time () . ",
         user_id = " . $userdata['user_id'] . ",
         username = '" . $userdata['username'] . "',
         user_level = " . $userdata['user_level'] . ",
         user_allow_viewonline = " . $userdata['user_allow_viewonline'] . "
      WHERE ip = '" . $_SERVER['REMOTE_ADDR'] . "'
      LIMIT 1";
   if ( !$db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, 'Could not update Eazystats table', '', __LINE__, __FILE__, $sql);
   }
}
else
{
   $sql = "INSERT INTO " . EZSTATS_TABLE . "
      (stamp, ip, user_id, username, user_level, user_allow_viewonline)
      VALUES
      (". time() .",
      '".$_SERVER['REMOTE_ADDR']."',
      " . $userdata['user_id'] . ",
      '" . $userdata['username'] . "',
      " . $userdata['user_level'] . ",
      " . $userdata['user_allow_viewonline'] . ")";
   if ( !$db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, 'Could not insert to Eazystats table', '', __LINE__, __FILE__, $sql);
   }
}
$db->sql_freeresult($result);


Replace With:

Code: [Download] [Hide] [Select]
// If IP exists, do update. Else, do insert.
//
if ( $row = $db->sql_fetchrow($result) )
{
   $sql = "UPDATE " . EZSTATS_TABLE . "
              SET stamp = " . time () . ",
                  user_id = '" . $userdata['user_id'] . "',
                  username = '" . $userdata['username'] . "',
                  user_level = '" . $userdata['user_level'] . "',
                  user_allow_viewonline = '" . $userdata['user_allow_viewonline'] . "'
              WHERE ip = '" . $_SERVER['REMOTE_ADDR'] . "'
        LIMIT 1";
   if ( !$db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, 'Could not update Eazystats table', '', __LINE__, __FILE__, $sql);
   }
}
else
{
   $sql = "INSERT INTO " . EZSTATS_TABLE . "
      (stamp, ip, user_id, username, user_level, user_allow_viewonline)
      VALUES
      (". time() .",
      '".$_SERVER['REMOTE_ADDR']."',
      '" . $userdata['user_id'] . "',
      '" . $userdata['username'] . "',
      '" . $userdata['user_level'] . "',
      '" . $userdata['user_allow_viewonline'] . "')";
   if ( !$db->sql_query($sql) )
   {
      message_die(GENERAL_ERROR, 'Could not insert to Eazystats table', '', __LINE__, __FILE__, $sql);
   }
}
$db->sql_freeresult($result);


Remember to back-up all files you edit


____________

I know this is an old post but I got bored and clicked "View Unanswered Posts" in hopes that I could help and maybe.. just maybe.. these people are watching this topic, also marking SOLVED on all posts that have been solved to tidy up a bit
 




____________
Hello, I'm your mind, giving you someone to talk to.
Black Fusion - Designs
..Join.My.Vampire.Family..
 
FrostSend private messageVisit poster's website  
Back to topPage bottom
Post new topic  This topic is locked: you cannot edit posts or make replies.  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events