| | |
MySQL newbie need help with create table definitons syntax
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2004
Posts: 1
Reputation:
Solved Threads: 0
I am extremely new to MySQL and web databse programming. I am runnning an Invision Board forum and have had numerous problems when installing mods (I know, install at my own risk, blah blah blah). My question is this: I am restoring the SQL database (I did make a backup; I'm not completely stupid), and I am trying to restore it (all the table are in parts). I came to the ibf_posts table (name of table is irrelevant) and am trying to make it create the table on my new database.
CREATE TABLE ibf_posts (
pid int(10) NOT NULL default "" auto_increment,
append_edit tinyint(1),
edit_time int(10),
author_id mediumint(8) NOT NULL default "0",
author_name varchar(32),
use_sig tinyint(1) NOT NULL default "0",
use_emo tinyint(1) NOT NULL default "0",
ip_address varchar(16) NOT NULL default "",
post_date int(10),
icon_id smallint(3),
post text, - Here's my problem: I didn't change this line; it worked fine in the old DB, so what's wrong with my syntax
queued tinyint(1),
topic_id int(10) NOT NULL default "0",
forum_id smallint(5) NOT NULL default "0",
attach_id varchar(64),
attach_hits int(10),
attach_type varchar(128),
attach_file varchar(255),
post_title varchar(255),
new_topic tinyint(1),
edit_name varchar(255),
PRIMARY KEY (pid),
UNIQUE topic_id (topic_id,author_id),
UNIQUE author_id (author_id),
UNIQUE forum_id (forum_id,post_date),
UNIQUE post (post)
);
CREATE TABLE ibf_posts (
pid int(10) NOT NULL default "" auto_increment,
append_edit tinyint(1),
edit_time int(10),
author_id mediumint(8) NOT NULL default "0",
author_name varchar(32),
use_sig tinyint(1) NOT NULL default "0",
use_emo tinyint(1) NOT NULL default "0",
ip_address varchar(16) NOT NULL default "",
post_date int(10),
icon_id smallint(3),
post text, - Here's my problem: I didn't change this line; it worked fine in the old DB, so what's wrong with my syntax
queued tinyint(1),
topic_id int(10) NOT NULL default "0",
forum_id smallint(5) NOT NULL default "0",
attach_id varchar(64),
attach_hits int(10),
attach_type varchar(128),
attach_file varchar(255),
post_title varchar(255),
new_topic tinyint(1),
edit_name varchar(255),
PRIMARY KEY (pid),
UNIQUE topic_id (topic_id,author_id),
UNIQUE author_id (author_id),
UNIQUE forum_id (forum_id,post_date),
UNIQUE post (post)
);
![]() |
Similar Threads
- Syntax error in CREATE TABLE (MS Access and FileMaker Pro)
- "Syntax error in CREATE TABLE" (MS Access and FileMaker Pro)
- Help me with: Access CREATE TABLE() SQL (MS Access and FileMaker Pro)
- Python-mysql for checking table exist or not (Python)
- error 1005 at line 46: Can't create table '.\time\entrytab.frm' (errno :150) (MySQL)
- MySQL: Spam Free (Send/Receive) Emails. HOW? (MySQL)
- SQL Create table error (ASP.NET)
Other Threads in the MySQL Forum
- Previous Thread: uploading .txt file via phpmyadmin to Mysql
- Next Thread: libmysqld
| Thread Tools | Search this Thread |
agplv3 alfresco amazon api artisticlicense aws bizspark breathalyzer camparingtocolumns changingprices cmg communityjournalism contentmanagement contractors copyright count court crm database design developer development distinct drupal ec2 email enterprise eudora facebook form foss gartner gnu gpl greenit groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier join journalism keywords kickfire laptop law legal license licensing linux maintenance managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple music mysql mysqlcolumnupdating mysqldatetimeordermax() mysqlindex mysqlinternalqueries mysqlquery mysqlsearch news open-xchange opendatabasealliance opengovernment opensource oracle penelope php priceupdating query referencedesign reorderingcolumns resultset saas select sharepoint simpledb sourcecode spotify sql sugarcrm syntax techsupport thunderbird transparency virtualization





