Jump to content

Recommended Posts

I am trying to get the following to create a database in my mysql database. But when I try to execute it via PHPMYADMIN I get errors and not all of my tables are created I was wondering if anyone could help me correct this problem. I am new to the entire MySQL and PHP coding but trying to learn.

[code]CREATE TABLE users (
id int NOT NULL auto_increment,
username varchar(20) NOT NULL default ",
userlevel varchar(15) NOT NULL default ",
password varchar(32) binary NOT NULL default ",
email char(255) NOT NULL default ",
secretq char(255) NOT NULL default ",
secreta char(255) NOT NULL default ",
ip char(15) NOT NULL default ",
handle char(17) NOT NULL default ",
aboutuser char(255) NOT NULL default ",
gamename char(30) NOT NULL default ",
teamname char(30) NOT NULL default ",
hardware char(255) NOT NULL default ",
cookie char(32) binary NOT NULL default ",
session char(32) binary NOT NULL deafualt ",
PRIMARY KEY (id),
UNIQUE KEY username (username)
);
[/code]
[!--quoteo(post=387394:date=Jun 24 2006, 03:23 AM:name=cameeob2003)--][div class=\'quotetop\']QUOTE(cameeob2003 @ Jun 24 2006, 03:23 AM) [snapback]387394[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I am trying to get the following to create a database in my mysql database. But when I try to execute it via PHPMYADMIN I get errors and not all of my tables are created I was wondering if anyone could help me correct this problem. I am new to the entire MySQL and PHP coding but trying to learn.

[code]CREATE TABLE users (
id int NOT NULL auto_increment,
username varchar(20) NOT NULL default ",
userlevel varchar(15) NOT NULL default ",
password varchar(32) binary NOT NULL default ",
email char(255) NOT NULL default ",
secretq char(255) NOT NULL default ",
secreta char(255) NOT NULL default ",
ip char(15) NOT NULL default ",
handle char(17) NOT NULL default ",
aboutuser char(255) NOT NULL default ",
gamename char(30) NOT NULL default ",
teamname char(30) NOT NULL default ",
hardware char(255) NOT NULL default ",
cookie char(32) binary NOT NULL default ",
session char(32) binary NOT NULL deafualt ",
PRIMARY KEY (id),
UNIQUE KEY username (username)
);
[/code]
[/quote]
What version, what errors? Also, default isn't spelled correctly in your last column.
  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.