View Full Version : MySql Query Error
brianoakes
1-12-05, 10:35 PM
I know there have been some upgrades today, but my site is still getting some problems.
Can someone please tell me how to fix this:
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 ibmembers m
LEFT JOIN ibgroups g ON (g.g_id=m.mgroup)
LEFT JOIN ibmoderators mod ON (mod.member_id=m.id OR mod.group_id=m.mgroup )
WHERE m.id='2'
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: Wednesday 12th of January 2005 06:33:22 PM
tbonekkt
1-12-05, 10:36 PM
http://forum.powweb.com/showthread.php?t=45463
brianoakes
1-12-05, 10:39 PM
looks like it's going to be hard.
I am not that good at all the technical stuff..
thanks though
acfishing
1-12-05, 10:39 PM
tbone, you post this link, but it somehow does not help out at all. could you please explain what to do for us people that don't have MX?
tbonekkt
1-12-05, 10:41 PM
Apparently, the problem is the word 'mod' as that word is now reserved (http://dev.mysql.com/doc/mysql/en/Reserved_words.html). Beyond that, I don't know much more.
acfishing
1-12-05, 10:44 PM
I'm using invision board and have searched all the files and have not found any mod references. I do not know what more to do, it seems like nobody who is smart enough wants to help.
The person who started this thread has a problem with the word "mod" or "mod." a search might not show it if is in the form "mod.something.something" depending on how you configured the search. Post a link to the page that is giving the error.
brianoakes
1-12-05, 10:51 PM
Actfishing..
I am using the same thing, Invision board, and also have not been able to find the word mod in my files.
If you are able to get yours resolved, could you PM me and let me know what you did?
Zinco,
This is the page that is giving me the problem:
http://www.seahawkers.org/message.htm
Thanks,
Brian
This problem would apply to any php board. I do not know if this is the only conflict with MySql 4.1 and can't tell much without seeing the exact error message. with page and line number.
With Brian the problem is just above line 6 of the file of whatever page he is trying to load when it happens.
brianoakes
1-12-05, 10:53 PM
Zinco,
This is the page that is giving me the problem:
http://www.seahawkers.org/message.htm
princess
1-12-05, 10:55 PM
Here is the solution check if it works for you..
http://forum.powweb.com/showthread.php?t=45494
Funny those boards are loading fine for me. Maybe because I am not logged in.......it might occur after the login part in the page. Give me a bit and I will register and see. Also it would not be that page but the page within the I frame.
brianoakes
1-12-05, 11:02 PM
Thank you princess so much... that worked WONDERFULLY!
I get the error when I am logged in. What page is it that loads in that I frame? Whatever page it is look just above line 6 of that file.
islandtime
1-13-05, 11:02 PM
Thanks a bunch!! I had found the line where the problem was but couldn't quite figure out how to solve it. Thanks Zinco and Princess :cool: :cool:
islandtime
1-14-05, 12:36 AM
I noticed where another invision user was having problem bulk emailing after he got the "mod" error solved. I have traked the bulk mail problem to this query:
$DB->query("SELECT COUNT(id) as total FROM ibf_members WHERE mgroup IN($group_str)".$where);
$rows = $DB->fetch_row();
if ($rows['total'] < 1)
{
$this->bulk_mail_form(1, 'Errors', 'Please expand your criteria as no members could be found to email using the supplied information');
exit();
}
If run a query using invisions mysql toolbox, I get the following message.
Query ran:
SELECT COUNT(id) as total FROM ibf_members WHERE mgroup IN($group_str)
Answer:
Unknown column '$group_str' in 'where clause'
I'm not exactly sure what this is looking for... Couldn't the script just email all members?
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.