Jump to content

Archived

This topic is now archived and is closed to further replies.

thindery

what does this error mean?

Recommended Posts

i did a query but then i got this error:::

 

Error

 

SQL-query :

 

CREATE TABLE news{id int( 10 ) NOT NULL auto_increment,

title varchar( 100 ) NOT NULL ,

text text NOT NULL ,

PRIMARY KEY ( id ) }

 

MySQL said:

 

 

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 \'{id int( 10 ) NOT NULL auto_increment, title varchar( 100 )

Back

 

 

i coppied the query directly from one of the phpfreaks tutorials. please help

Share this post


Link to post
Share on other sites

Wow.. this query is indeed corrupt, but in a small way. The brackets {/} should be parenthesis (). The correct way of implementing this (without possible error) would be:

CREATE TABLE `news` ( `id` int( 10 ) NOT NULL auto_increment, `title` varchar( 100 ) NOT NULL , `text` text NOT NULL , PRIMARY KEY ( id ) )

 

Hope that helps.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.