[SOLVED] Help Creating New .SQL Table (Beginner)

This is a discussion on "[SOLVED] Help Creating New .SQL Table (Beginner)" within the Databases section. This forum, and the thread "[SOLVED] Help Creating New .SQL Table (Beginner) are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 31st, 2007, 16:27
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Smile [SOLVED] Help Creating New .SQL Table (Beginner)

Hi, i have loginscript but need help creating the sql table for it the information i need to create the .sql file is as follows

firstname
lastname
email
address1
address2
city
state
zip
country
level

so does any one know how to create sql table please, the table will be called members.

Thanks
Aaron
Reply With Quote

  #2 (permalink)  
Old Oct 31st, 2007, 16:28
karinne's Avatar
SuperMember

SuperMember
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

Hmmm ... you could have found this in the documentation on the MySQL site

http://dev.mysql.com/doc/refman/5.0/...ate-table.html
Reply With Quote
  #3 (permalink)  
Old Oct 31st, 2007, 16:29
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: Help Creating New .SQL Table (Beginner)

Try this: http://www.w3schools.com/sql/sql_create.asp.

Hope that helps!
Reply With Quote
  #4 (permalink)  
Old Oct 31st, 2007, 16:41
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

cheers Both of you will check them out now cause i am a total beginner at creating a sql table lol.

so i am trying so hard lol
Reply With Quote
  #5 (permalink)  
Old Nov 1st, 2007, 01:42
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Help Creating New .SQL Table (Beginner)

Or you could use MySQL GUI Tools to create your database visually..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #6 (permalink)  
Old Nov 3rd, 2007, 09:42
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

Hey i downloaded the 5.0 GUI Tool but how do i get it to connect please thanks
do i need to download MYSQL Enterprise
Reply With Quote
  #7 (permalink)  
Old Nov 3rd, 2007, 10:12
SuperMember

SuperMember
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

Have you tried xampp.
you could create your db's and tables through phpmyadmin.
Reply With Quote
  #8 (permalink)  
Old Nov 3rd, 2007, 13:55
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

Well i am a total beginner so know have never sued xampp and also i know how to create tables in phpmyadmin but dont know what values or what to give them and the what to give the primary key
Reply With Quote
  #9 (permalink)  
Old Nov 4th, 2007, 16:48
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

hi everyone i have this sql table and i get errors when importing it can anyone help me fix these errors

Code: Select all
CREATE TABLE 'user'(
'id' int(10) unsigned NOT NULL AUTO_INCREMENT,
'username' varchar(20) NOT NULL default '',
'password' varchar(50) NOT NULL default '',
'email' varchar(40) NOT NULL default '',
'ip' varchar( 20) NOT NULL default '',
PRIMARY KEY ('id')
) ENGINE = MYISAM AUTO_INCREMENT =1 DEFAULT CHARSET = latin1 AUTO_INCREMENT=1 ;
Reply With Quote
  #10 (permalink)  
Old Nov 4th, 2007, 16:50
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: Help Creating New .SQL Table (Beginner)

What error(s) do you get Aaron?
Reply With Quote
  #11 (permalink)  
Old Nov 4th, 2007, 16:52
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

these are errors and as i am a total beginner i wouldnt know what it meant lol i no it means line 1 but still bit dont know what is wrong with it

Code: Select all
Error
 
SQL query: 
 
CREATE TABLE 'user'( 'id'int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
'username'varchar( 20 ) NOT NULL default '',
'password'varchar( 50 ) NOT NULL default '',
'email'varchar( 40 ) NOT NULL default '',
'ip'varchar( 20 ) NOT NULL default '',
PRIMARY KEY ( 'id' ) 
) ENGINE = MYISAM AUTO_INCREMENT = 1DEFAULT CHARSET = latin1 AUTO_INCREMENT =1 
MySQL said:  
#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 ''user'(
 
'id'int(10) unsigned NOT NULL AUTO_INCREMENT ,
'username'varchar(20)' at line 1
Reply With Quote
  #12 (permalink)  
Old Nov 4th, 2007, 16:54
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: Help Creating New .SQL Table (Beginner)

you have to use " ` " instead of " ' "....
Reply With Quote
  #13 (permalink)  
Old Nov 4th, 2007, 16:58
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

ok, i will try now and if doesnt work i give you the error i get
Reply With Quote
  #14 (permalink)  
Old Nov 4th, 2007, 17:02
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: Help Creating New .SQL Table (Beginner)

I think it should be

Code: Select all
CREATE TABLE `user`( `id`int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
`username`varchar( 20 ) NOT NULL default ``,
`password`varchar( 50 ) NOT NULL default ``,
`email`varchar( 40 ) NOT NULL default ``,
`ip`varchar( 20 ) NOT NULL default ``,
PRIMARY KEY ( `id` ) 
) ENGINE = MYISAM AUTO_INCREMENT = 1DEFAULT CHARSET = latin1 AUTO_INCREMENT =1
But i am no expert at MySQL
Reply With Quote
  #15 (permalink)  
Old Nov 4th, 2007, 17:08
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Help Creating New .SQL Table (Beginner)

hey you where nearly there lol, what you had to do instead of having " ` " at the end of default you put the normal " ' " and it worked so you where nearly there lol

P.S thanks for the help mate most appreciated.

Thanks
Aaron
Reply With Quote
  #16 (permalink)  
Old Nov 4th, 2007, 17:13
Marc's Avatar
Moderator

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Age: 15
Posts: 1,661
Thanks: 0
Thanked 9 Times in 9 Posts
Re: Help Creating New .SQL Table (Beginner)

lol, i just did a little search and replace in Notepad and forgot about that LOL.. Sorry!

Glad you got it sorted and if you are finished, go into Thread Tools then Mark Thread as Solved.

Cheers,
Reply With Quote
  #17 (permalink)  
Old Nov 4th, 2007, 17:17
Reputable Member
Join Date: Jul 2006
Location: Baldock
Age: 20
Posts: 447
Thanks: 0
Thanked 0 Times in 0 Posts
Re: [SOLVED] Help Creating New .SQL Table (Beginner)

Done
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Please help with creating a Mailing list form. Oak Starting Out 3 Dec 26th, 2007 18:54
[SOLVED] Beginner that needs helps defy Starting Out 7 Nov 16th, 2007 11:20
[SOLVED] Creating users/members? vistar PHP Forum 7 Oct 25th, 2007 00:04
Creating a scroll bar within a table Diablo Web Page Design 5 Mar 12th, 2007 16:10
Creating Table with Random Number spinal007 Classic ASP 1 Jun 1st, 2006 06:57


All times are GMT. The time now is 07:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43