Jump to content

not sure why I am getting an error with this SQL


webguync

Recommended Posts

Hi, I am trying to create we table by copying and pasting the following into PHPMyAdmin. Not sure why, but I get a MySQL error.

 

//Comments Table
CREATE TABLE comments
(
com_id INT PRIMARY KEY AUTO_INCREMENT,
com_name VARCHAR(100),
com_email VARCHAR(100),
com_dis TEXT,
post_id_fk INT,
FOREIGN KEY(post_id_fk) REFERENCES posts(post_id)
);

 

anyone know why?

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.