Jump to content


Photo

mysql error #1064


  • Please log in to reply
1 reply to this topic

#1 sk1tL1L

sk1tL1L
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 08 July 2006 - 10:58 PM

hey all i'm inserting this script to phpmyadmin:
CREATE TABLE forum_posts (
post_id int NOT NULL PRIMARY KEY AUTO_INCREMENT
topic_id int NOT NULL,
post_text text,
post_create_time datetime,
post_owner varchar( 150 )
);

and it is coming up with this error:
#1064 - 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 'topic_id int NOT NULL,
post_text text,
post_create_time datetime,
post_owner ' at line 3

thanks

#2 dual_alliance

dual_alliance
  • Members
  • PipPipPip
  • Advanced Member
  • 140 posts
  • LocationNSW, Australia

Posted 08 July 2006 - 11:58 PM

I think you have only forgotten one small ',' so this should work.

CREATE TABLE forum_posts (
post_id int NOT NULL PRIMARY KEY AUTO_INCREMENT,
topic_id int NOT NULL,
post_text text,
post_create_time datetime,
post_owner varchar( 150 )
);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users