Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Topic started by: orange on March 14, 2004, 07:40:33 AM

Title: Upgrade error on membergroups
Post by: orange on March 14, 2004, 07:40:33 AM
I decided to try out upgrading a copy of my YSE 1.5.5 forum to SMF, but on step 6 of the upgrade process I get this:

  Converting "membergroups"... Unsuccessful!
This query:
INSERT IGNORE INTO yabbse_membergroups
(ID_GROUP, groupName, onlineColor, minPosts, stars)
VALUES (1, 'Aztec Guy\'s Friend', '#FF0000', -1, '5#staradmin.gif'),
(2, 'Global Moderator', '#0000FF', -1, '5#stargmod.gif'),
(3, 'Moderator', '', -1, '5#starmod.gif'),
(4, 'Member', '', 0, '1#star.gif'),
(5, 'Member', '', 9999, '2#star.gif'),
(6, 'Full Member', '', 10000, '3#star.gif'),
(7, 'Senior Member', '', 25000, '4#star.gif'),
(8, 'AGS God', '', 50000, '5#star.gif'),
(19, 'Mittens Veteran', '', -1, ''),
(18, 'Mittens Crew', '', -1, ''),
(20, 'Mittens '02', '', -1, '');
Caused the 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 '02', '', -1, '')' at line 13


Presumably it's due to the fact that one of my membergroups has an apostrophe in its name - any ideas?
Title: Re: Upgrade error on membergroups
Post by: Chris Cromer on March 14, 2004, 07:42:22 AM
Yeah it is because of the apostrophe.

Just remove the apostrophe for now then do the upgrade... then after the upgrade you can put the apostrophe back.
Title: Re: Upgrade error on membergroups
Post by: Grudge on March 14, 2004, 08:51:05 AM
Yea, or change it to \'
ie:
20, 'Mittens \'02', '', -1, '');
Title: Re: Upgrade error on membergroups
Post by: orange on March 14, 2004, 09:09:23 AM
Hehe, well, I'd better not start hacking around in the upgrade.php for the sake of my own health ;)

Renaming the membergroup sounds like the best workaround then - I'll give that a go, cheers :)
Title: Re: Upgrade error on membergroups
Post by: [Unknown] on March 14, 2004, 05:02:59 PM
Actually, this is a problem caused by Settings.php not having certain things in it.

Open upgrade.php, and find the following:
(5, '$membergroups[4]', '', $JrPostNum, '2#star.gif'),
(6, '$membergroups[5]', '', $FullPostNum, '3#star.gif'),
(7, '$membergroups[6]', '', $SrPostNum, '4#star.gif'),
(8, '$membergroups[7]', '', " . (isset($HeroPostNum) ? $HeroPostNum : $GodPostNum) . ", '5#star.gif')" .


Replace it with:
(5, '$membergroups[4]', '', '$JrPostNum', '2#star.gif'),
(6, '$membergroups[5]', '', '$FullPostNum', '3#star.gif'),
(7, '$membergroups[6]', '', '$SrPostNum', '4#star.gif'),
(8, '$membergroups[7]', '', '" . (isset($HeroPostNum) ? $HeroPostNum : $GodPostNum) . "', '5#star.gif')" .


-[Unknown]
Title: Re: Upgrade error on membergroups
Post by: orange on April 04, 2004, 03:03:15 PM
Just to let you know, this error still occurs with beta 4.1 -- I presume upgrade.php is just missing an  addslashes  in this membergroups query, but you might want to get it fixed.