Click to See Complete Forum and Search --> : mySQL add comment to table


telconstar99
01-13-2007, 01:42 AM
Hey guys,

I'm having some trouble adding a comment to a table. I've never done this before so maybe I'm missing something. I thought maybe you guys could help. I'm running mySQL version 4.1. Thanks so much!

CREATE TABLE devotionals
(
id int NOT NULL auto_increment PRIMARY KEY,
Name varchar(255),
FileUpload varchar(255)
) COMMENT = 'devotionals';

The error message I receive is this:

CREATE TABLE devotionals ( id int NOT NULL auto_increment PRIMARY KEY, Name varchar(255), FileUploadRestricted varchar(255) ) COMMENT = 'devotionals';
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 ''devotionals'' at line 6

NogDog
01-13-2007, 11:27 AM
Hmmm....I copied and pasted your query and it ran just fine for me.

telconstar99
01-13-2007, 02:24 PM
Well that makes me feel better. Guess I'll have to take this issue up with my web hosting provider. I certainly have the permission to create tables.

NogDog
01-13-2007, 06:59 PM
You might want to make sure you're not somehow getting an extraneous invalid character in there (such as the left/right quotes ‘ and ’ instead of a ').

telconstar99
01-14-2007, 05:12 PM
I double checked that. Oh well, I'll live without the comments for now. Thanks for your help!

NightShift58
01-14-2007, 11:01 PM
I'm not sure where or when it was, but I "kinda" remember there being an issue with either a version of PHP or MySQL, where one couldn't send the semicolon at the end of the SQL statement from within a PHP mysql_query().

You may want to try with the closing ";" and see if it makes a difference.