Jump to content

what does this error mean?


thindery

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

Link to comment
https://forums.phpfreaks.com/topic/531-what-does-this-error-mean/
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.

Link to comment
https://forums.phpfreaks.com/topic/531-what-does-this-error-mean/#findComment-1781
Share on other sites

Archived

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

×
×
  • Create New...

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.