Jump to content

Help: I'm a noob again ;D


clown[NOR]

Recommended Posts

well... i've just set up wamp on my computer so I can now start using db... BUT... I have absolutely no clue about it what so ever...

 

But I'm reading a lil about it ... so what I wonder... to make a completely new database .. let's say the name should be

 

contacts

 

.. should I do something like this then?

CREATE TABLE games (FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL, Address VARCHAR(50) NOT NULL, ZipCode INT NOT NULL, City VARCHAR(30) NOT NULL, Phone INT NOT NULL, CellPhone INT, Email VARCHAR(30), Website VARCHAR(50));

 

and also.. is it possible to break ut the code to look something like this?

CREATE TABLE games (
FirstName VARCHAR(20) NOT NULL, LastName VARCHAR(20) NOT NULL, 
Address VARCHAR(50) NOT NULL, ZipCode INT NOT NULL, City VARCHAR(30) NOT NULL, 
Phone INT NOT NULL, CellPhone INT, Email VARCHAR(30), Website VARCHAR(50)
);

Link to comment
https://forums.phpfreaks.com/topic/46342-help-im-a-noob-again-d/
Share on other sites

Hmm.. I'm not sure what are you trying to do, but yes you can break down the sql query as you wrote on the 2nd code box.

 

I would break down furthermore to make it easier to see.. XD

CREATE TABLE games (
FirstName VARCHAR(20) NOT NULL,
LastName VARCHAR(20) NOT NULL,
Address VARCHAR(50) NOT NULL,
ZipCode INT NOT NULL,
City VARCHAR(30) NOT NULL, 
Phone INT NOT NULL,
CellPhone INT,
Email VARCHAR(30),
Website VARCHAR(50)
);

boo_lolly..how do you think i found the info ? ofcourse i used google first... dont be such a smartass... i always google first.. i just came here to verify...

 

hackerkts... thanks... what i'm trying to do is create a database called contacts (i know it sais games.. just forgot to change the name after i copied it from the site i found when i searched on GOOGLE)

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.