Jump to content


Photo

what does this error mean?


  • Please log in to reply
2 replies to this topic

#1 thindery

thindery
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 May 2003 - 05:53 PM

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

#2 metalblend

metalblend
  • Members
  • PipPipPip
  • Advanced Member
  • 89 posts
  • LocationCalifornia, USA

Posted 30 May 2003 - 07:54 PM

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.

#3 thindery

thindery
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 31 May 2003 - 12:34 AM

yep thanks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users