List:General Discussion« Previous MessageNext Message »
From:Nicole Garris Date:January 15 2008 9:27pm
Subject:RE: Error
View as plain text  
 
Best practice: Don't use reserved words for object (table, column,
constraint, etc.) names.
Here's your complete reserved word list for MySQL 5:
http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-refe
rence-reservedwords-5-0.html

-----Original Message-----
From: Rolando Edwards [mailto:redwards@stripped] 
Sent: Tuesday, January 15, 2008 1:17 PM
To: Pastor Steve; MySQL List
Subject: RE: Error

ORDER is a reserved word in standard SQL

Example : SELECT FirstName,LastName FROM Names ORDER BY
LastName,FirstName;

If the column name in the table is ORDER, then put backquotes (`) around
the word ORDER when using it as a column name

INSERT INTO sections (`order`,edit,remove,section,type) VALUES
('blah','blah','blah','blah','blah');


-----Original Message-----
From: Pastor Steve [mailto:smarquez@stripped]
Sent: Tuesday, January 15, 2008 4:02 PM
To: MySQL List
Subject: Error

Greetings,

I am trying to enter this information into a database called cms_md,
with a table called sections.

INSERT INTO sections (order,edit,remove,section,type) VALUES
('blah','blah','blah','blah','blah');
I am getting an error whenever I use this.

--
Steve M

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1

Thread
ErrorPastor Steve15 Jan
  • Re: ErrorSaravanan15 Jan
    • Re: ErrorPastor Steve15 Jan
      • Re: ErrorBaron Schwartz15 Jan
  • RE: ErrorRolando Edwards15 Jan
    • Re: Error, thanks!Pastor Steve15 Jan
    • RE: ErrorNicole Garris15 Jan
      • Re: ErrorMoon's Father16 Jan