my first error code

jwells - February 5, 2005 - 08:19

this is my first error, not sure how to approach it - advice please :-)

user error: 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 'na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','term
query: SELECT r.nid, r.timestamp, u.uid AS user, u.name, u.mail, n.title, n.body, e.start FROM remindme_node r INNER JOIN node n ON r.nid = n.nid INNER JOIN node_access na ON (na.nid = 0 OR na.nid = n.nid) INNER JOIN users u ON r.uid = u.uid INNER JOIN event e ON e.nid = r.nid WHERE n.status = 1 AND r.timestamp > 0 AND 1107589441 + r.timestamp > e.start na.grant_view = 1 AND CONCAT(na.realm, na.gid) IN ('all0','term_access1') GROUP BY user, n.nid in /hsphere/local/home/mysite.com/includes/database.mysql.inc on line 125.

Sigh...

SargeTron - February 5, 2005 - 09:38

It's drupal's fault...

  • Did you install it correctly?
  • Do you have the SQL info correct?
  • Do you have the right version of PHP / MySQL?

If yes then I can't help you.

Tables not in DB?

Jaza - February 5, 2005 - 11:19

There are three likely causes that I can think of for this problem:

  1. remindme.module requires event.module in order to function. Do you have event.module installed and enabled on your site?
  2. Both remindme.module and event.module come with SQL scripts, that need to be run as part of the process of installing them. In the modules/remindme folder (in your Drupal base folder), you should see a file called remindme.mysql; and in the modules/event folder, you should see one called event.mysql. These scripts set up some of the tables that your problem query is referencing. Have you run these scripts in your Drupal mySQL database?
  3. You have modified one or more SQL queries in the code of remindme.module, and your modifications have caused the syntax error. If this is the case, then check your changes very carefully, make sure that the syntax is correct (the mySQL reference manual may help with this), and if you cannot get it to work, revert to the original code.

Re: no. 2 above - running these scripts is listed as step 1 in the installation instructions for both these modules. However, it is easy to forget about running the DB scripts when installing new modules, particularly if you are installing a lot of new modules at once. The fact that not all modules have DB install scripts, and that there is no quick way to check (i.e. no list of which modules require this and which ones don't), does not help. I have forgotten to run these scripts many times myself.

If none of these possibilities are the cause of your problem, then I'm out of ideas.

Jeremy Epstein - GreenAsh

thanks gang, I have a

jwells - February 5, 2005 - 17:44

thanks gang, I have a direction to poke around at now.

I did just recently load the newer verson of remindme 1/15/05 and gave it its own folder, instead of base root. I deleted that version.

thanks again

FYI

jwells - February 6, 2005 - 21:45

the above error was also reported as a bug and has been repaired by Killes. the patch can be found in the CVS.

best regards

 
 

Drupal is a registered trademark of Dries Buytaert.