Forums / General Questions / mysql error 1064 ... near 'TYPE=MyISAM'

mysql error 1064 ... near 'TYPE=MyISAM'

Views: 2,621

Results 1 to 8 of 8
28 Jul 2014, 2:27 AM
#1
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

mysql error 1064 ... near 'TYPE=MyISAM'

this is the error:

1064 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 'TYPE=MyISAM' at line 6
in:
[CREATE TABLE IF NOT EXISTS zen_custom_zen ( id int(11) NOT NULL auto_increment, module varchar(50) NOT NULL default '', version char(10) NOT NULL default '', UNIQUE KEY id (id) ) TYPE=MyISAM]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

It is for a paid for module called Private Area which is so my merchants can log into their own area of "admin" then enter the description/price and so forth to their own products while awaiting testing.

I get that error when trying to access the "Edit Permissions" button.

I see from searching that most likely it is due to the Type needing to be changed to Engine but it was functioning perfectly before our move..

If that is what is the problem with this portion of the controls not working anymore--- how does one go about editing only the tables from Type to Engine, this does not seem to affect anywhere that needs permissions changed, only this mod.

28 Jul 2014, 2:55 AM
#2
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: mysql error 1064 ... near 'TYPE=MyISAM'

Back Up First!!

Then in that code try and replace

TYPE=MyISAM

with

ENGINE=MyISAM

If this was working before and the error only appears now then it is most likely due to and update of the MySQL version on the server.

NOTE: We are sorry that Frank is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

28 Jul 2014, 11:28 PM
#3
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: mysql error 1064 ... near 'TYPE=MyISAM'

or just remove "TYPE=MyISAM" altogether.. Truthfully it's not needed..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Jul 2014, 6:07 AM
#4
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: mysql error 1064 ... near 'TYPE=MyISAM'

But, the table is already there, it has been for a very long time. It just started not letting me edit permissions for the merchants just a few days ago and everything else works.

maybe if I reupload its files, could be something got corrupted in the move?

I did try to run the sql but it won't let me since the table is there.

29 Jul 2014, 12:47 PM
#5
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: mysql error 1064 ... near 'TYPE=MyISAM'

DarkAngel:

But, the table is already there, it has been for a very long time. It just started not letting me edit permissions for the merchants just a few days ago and everything else works.

maybe if I reupload its files, could be something got corrupted in the move?

I did try to run the sql but it won't let me since the table is there.
That SQL comes from your custom module.. edit the part of the code which contains that piece of code to remove the offending part and see if that fixes it..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Jul 2014, 12:57 PM
#6
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: mysql error 1064 ... near 'TYPE=MyISAM'

DivaVocals:

That SQL comes from your custom module.. edit the part of the code which contains that piece of code to remove the offending part and see if that fixes it..

I think I did it right but as you can see it doesn't look right and nope still get the error when trying to edit permissions.

[Attachment no longer available]

29 Jul 2014, 2:23 PM
#7
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: mysql error 1064 ... near 'TYPE=MyISAM'

DarkAngel:

I think I did it right but as you can see it doesn't look right and nope still get the error when trying to edit permissions.

[Attachment no longer available]

Based on what you posted, your custom code appears to attempting to run a "create table" bit of SQL.. You need to use the developers tool kit to figure our what part of your code is attempting to execute this bit of SQL and remove the code that is causing the issue..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

29 Jul 2014, 2:26 PM
#8
darkangel avatar

darkangel

Totally Zenned

Join Date:
Oct 2007
Location:
Emporia, Kansas
Posts:
1,729
Plugin Contributions:
0

Re: mysql error 1064 ... near 'TYPE=MyISAM'

ok, will do that later when i get up...been up for 24 hours and now need to sleep before my head falls off...not a pretty sight...LOL