|
Page 1 of 1
|
Leon
Joined: November 2006
Posts: 46
|
 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:
- Could not update Eazystats table
-
- DEBUG MODE
-
- 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
-
- UPDATE phpbb_ezstats SET stamp = 1165263542, user_id = , username = '', user_level = , user_allow_viewonline = WHERE ip = '69.238.117.146' LIMIT 1
-
- Line : 88
- File : ezstats.php
-
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 ?
|
#1 Mon 04 Dec, 2006 23:16 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
Frost 
Joined: December 2006
Posts: 60
Location:  root/
|
 Re: Ezstats Mod
Hi, try this and let me know
Open:
includes/ezstats.php
Find:
// 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:
// 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
|
#2 Wed 10 Jan, 2007 20:51 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
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
|
|
|
|