PDA

View Full Version : Error Message mySQL error code: 1064


Bad Hair Day
6-15-05, 02:23 PM
I've been getting this message on a forum I have on my site.

Problem is, it just started one day - I have gone through the repair functions and that hasn't worked, so I'm at a complete loss.

I have another forum using the same script which works fine. (Invision Power Board(U) v1.3.1 Final)

Can anyone come up with an idiot-proof way of helping me fix this please?

Or is it something that PowWeb could sort out for me at the flick of a switch?

Thanks in advance.

BHD

RTH10260
6-15-05, 08:18 PM
Error Message mySQL error code: 1064
I've been getting this message on a forum I have on my site.

Problem is, it just started one day - I have gone through the repair functions and that hasn't worked, so I'm at a complete loss.
From the manual:Error: 1064 SQLSTATE: 42000 (ER_PARSE_ERROR)
Message: %s near '%s' at line %d So it would seem that some sql statement you are using, is screwed up. How about looking at the code at the error location ?

Bad Hair Day
6-16-05, 01:04 PM
From the manual:So it would seem that some sql statement you are using, is screwed up. How about looking at the code at the error location ?
MySQL makes as much sense to me as the Hebrew language does.

Here's the full message I'm getting:

mySQL query error: SELECT mod.mid as is_mod, m.id, m.name, m.mgroup, m.password, m.email, m.allow_post, m.view_sigs, m.view_avs, m.view_pop, m.view_img, m.auto_track,
m.mod_posts, m.language, m.skin, m.new_msg, m.show_popup, m.msg_total, m.time_offset, m.posts, m.joined, m.last_post,
m.last_visit, m.last_activity, m.dst_in_use, m.view_prefs, g.*
FROM Evenmembers m
LEFT JOIN Evengroups g ON (g.g_id=m.mgroup)
LEFT JOIN Evenmoderators mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup )
WHERE m.id='1'

mySQL 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 'mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup )
WHERE m.' at line 6
mySQL error code: 1064
Date: Thursday 16th of June 2005 08:58:49 AM

I have no idea what it all means, it just stops my forum from working, yet the Admin CP is just fine.

If anyone can help resolve this problem for me, in language I can understand, I'll be eternally grateful.

BHD

RTH10260
6-16-05, 08:39 PM
MySQL makes as much sense to me as the Hebrew language does.

Here's the full message I'm getting:
[...]
I have no idea what it all means, it just stops my forum from working, yet the Admin CP is just fine.

If anyone can help resolve this problem for me, in language I can understand, I'll be eternally grateful.Translating 'computer Hebrew' for you:
The statement tells the database system to retrieve (SELECT) content from three database tables (Evenmembers, Evengroups, Evenmoderators). As these names are rather long, they have been assigned a short synonym (m, g, mod). The SELECT specifies which columns (fields) from those three tables are needed using the format 'tablename.columnname'. Cause the content is pulled from three different tables, it is necessary to tell which key fields need to match, eg JOIN ON. The main selection criteria is given using the WHERE part.
OK, so don't get sleepless nights if you still don't understand this ;)

As for the error message, it seems to point to some problem with the Evenmoderators table. To my eye, the sql statement itself is correct. One would have to look at the database using phpmyadmin.

As I don't know anything about the forum package you are using, I will drop out of the discussion here, and hope someone else can pick up and assist, using this analysis.

mitchind
6-17-05, 12:45 AM
Just a wild guess but mod might be a reserved word - try changing the name of the table from "Evenmoderators mod" to "Evenmoderators tbl_mod"

Then of course you'll have to change all other references to "mod" as well.

You might want to search the Invision IPB site for their forums - it might be from the mysql upgrade awhile back. Their might even be some answers here in our CMS forum?

Bad Hair Day
6-22-05, 09:19 AM
Thanks for your input......

Seems to me that it's dead in the water.

I reckon it's time to call in the undertaker.

BHD