dlsilverman
Forum Replies Created
-
Thank you. My problem had to do with using the keyword “key” as a column name, not enclosed in back-ticks.
When I used the option in phpMyAdmin to dump the table structure, it created an SQL statement with all of the column names enclosed in back quotes. This will solve the problem.
I think you’re right Vandman – the keyword “key” probably cant be used as a column name in that syntax. When I created the table manually using the graphical user interface in mySQL it didn’t object to using “key” as a column name, but when it is done in the “CREATE TABLE” command it is confusing the mySQL engine. That would be my guess.
David
Greg,
For some reason my mySQL rejects that CREATE TABLE as well. I would guess it has to do with the version of mySQL that I am running. If I have time I’ll try narrowing down the problem, but I am thinking it may have to do with the “NOT NULL” syntax.
I’ve created the table manually with the keys you suggested and everything seems to be working fine. Thanks for your attention to this !
David
do I need an index on that table?
I created it through the phpMyAdmin User Interface but I couldnt figure out how to do the AUTOINCREMENT=48 or DEFAULT CHARSET … but the table is created now … is the autoincrement important ?
I am using mySQL Version 5.1.67
I couldnt run that SQL – received the following 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 ‘bigint(20) NOT NULL, type varchar(25) NOT NULL, id bigint(20) NOT NULL, ur’ at line 2
I checked with phpMyAdmin and the table does NOT exist. I think I will simply use the SQL to create it. Thanks for the advice !