Hello,

First let me say that this is an awesome module. I started receiving an error when I log into my website. The error looks like this:

user warning: 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 'SELECT fid FROM profile_fields WHERE name = 'user_post_count') query: UPDATE profile_values SET value=36 WHERE fid = (SELECT fid FROM profile_fields WHERE name = 'user_post_count') AND uid=1 in /homepages/17/d247129354/htdocs/includes/database.mysql.inc on line 172.
user warning: 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 'SELECT fid FROM profile_fields WHERE name = 'user_ip_address') query: UPDATE profile_values SET value='66.242.207.210' WHERE fid = (SELECT fid FROM profile_fields WHERE name = 'user_ip_address') AND uid=1 in /homepages/17/d247129354/htdocs/includes/database.mysql.inc on line 172.

The error goes away after I disable this module. I was wondering what I need to do, or how to fix this. I would love to keep using this module. I really appreciate any help I can get on this.

Thanks

Comments

jaydub’s picture

Can you provide any more relevant information such as
what version of MySQL? Can you verify that the relevant
profile fields 'user_post_count' and 'user_ip_address' have
been created?

OutlawDesigns’s picture

Hello,

Thank you for your help. It is MYSQL 4.0. I can't find anywhere in my drupal site where there is a user_post_count or a user_ip_address. I thought once I installed the module, and configured it that everything would be installed. I installed the module, and configured it. It works great, except that error. It shows the posts and join date. It even shows me my IP address (Noone else's, however I logged in with a fake user with no access at all, just a regular authenticated user) and it showed my ip address to that user. Anymore information that is needed, please let me know. That error only shows when I log in (it shows to the authenitcated user as well) if I go to another section of the site the error disappears, and I don't see it again unless I log out, and log back in.

jaydub’s picture

Yeah I thought it might be this...your version of MySQL is
fairly out of date at this point...and user_stats makes use
of database subselects which were supported in MySQL
as of 4.1 (joining the rest of the database world that had
subselects for a long long time already).

I hate to say it but you'll be best served by looking into
upgrading your version of MySQL as even 4.1 will no
longer be supported in the next version of Drupal.

Rowanw’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.