Jump to content

[SOLVED] MySQL Query?


Crew-Portal

Recommended Posts

Can Someone tell me where the error is?

 

#CREATE TABLE AIRCRAFT

DROP TABLE IF EXISTS aircraft;

CREATE TABLE aircraft (

id INT(11) NOT NULL AUTO_INCREMENT,

aircraft NOT NULL VARCHAR(45),

short NOT NULL VARCHAR(7),

description TEXT,

passengers VARCHAR(4),

cargo VARCHAR(10),

rank VARCHAR(2)

);

 

#CREATE TABLE USERS

DROP TABLE IF EXISTS users;

CREATE TABLE `users` (

  `id` int(11) NOT NULL auto_increment,

  `username` varchar(255) collate latin1_general_ci NOT NULL,

  `password` varchar(255) collate latin1_general_ci NOT NULL,

  `email` varchar(255) collate latin1_general_ci NOT NULL,

  `ip` varchar(255) collate latin1_general_ci NOT NULL,

  `name` varchar(255) collate latin1_general_ci NOT NULL,

  `bday` varchar(255) collate latin1_general_ci NOT NULL,

  `date` varchar(255) collate latin1_general_ci NOT NULL,

  PRIMARY KEY  (`id`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

 

I am getting 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 'NOT NULL VARCHAR(45),

short NOT NULL VARCHAR(7),

description TEXT,

passengers' at line 3

Link to comment
https://forums.phpfreaks.com/topic/63323-solved-mysql-query/
Share on other sites

try this i tested it error came up but the tables where still made

 

CREATE TABLE `aircraft` (

`id` INT( 11 ) NOT NULL ,

`aircraft` VARCHAR( 45 ) NOT NULL ,

`short` VARCHAR( 7 ) NOT NULL ,

`description` TEXT NOT NULL ,

`passengers` VARCHAR( 4 ) NOT NULL ,

`cargo` VARCHAR( 10 ) NOT NULL ,

`rank` VARCHAR( 2 ) NOT NULL

);

 

CREATE TABLE `users` (

`id` INT( 11 ) collate latin1_general_ci NOT NULL,

`username` VARCHAR( 255 )  collate latin1_general_ci NOT NULL,

`password` VARCHAR( 255 )  collate latin1_general_ci NOT NULL,

`email` VARCHAR( 255 )  collate latin1_general_ci NOT NULL,

`ip` VARCHAR( 255 )  collate latin1_general_ci NOT NULL,

`name` VARCHAR( 255 ) collate latin1_general_ci NOT NULL,

`bday` VARCHAR( 255 ) collate latin1_general_ci NOT NULL,

`date` VARCHAR( 255 ) collate latin1_general_ci NOT NULL

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=1 ;

);

Link to comment
https://forums.phpfreaks.com/topic/63323-solved-mysql-query/#findComment-315577
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.