Hi,

each time my Cron runs I get this error:


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 ')' at line 1 query: SELECT uid FROM dp5inactive_users WHERE uid <> 1) in /www/includes/database.mysql.inc on line 172.

What might be the problem and how can I fix it?

Thanks for help in advance.

Comments

deekayen’s picture

Status: Active » Fixed

That closing parenthesis after the 1 on line 235 does not belong.

frerin’s picture

Line 235 is the following code.

   // reset notifications if recent user activity
    $users = db_fetch_object(db_query('SELECT uid FROM {inactive_users} WHERE uid <> 1'));
   

I think that the was the wrong line.

I think it could be line 268:

  $result = db_query('SELECT * FROM {users} WHERE access < (%d - %d) AND status <> 0 AND uid <> 1)', time(), $notify_time);

which should be

  $result = db_query('SELECT * FROM {users} WHERE access < (%d - %d) AND status <> 0 AND uid <> 1', time(), $notify_time);
deekayen’s picture

It was the same problem on many lines which was fixed in 1.3 and 1.4. Just try upgrading.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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