Jump to content

Call me a noob but I need to know how to make Fields in PHPMyAdmin


!!!!!

Recommended Posts

Okay, yes I know this is a newbie question but I have looked in a TON of different places to find the answer to my question but I just cannot find it!

 

Question:

 

What does all this mean? (I think I know what the Field thing is, the name of the field, the name that pops up when somebody searches the Table.)

 

Please try to tell me what it all means in simple terms :-P

 

untitled-3.jpg

untitled1.jpg

 

Thanks!

 

 

Link to comment
Share on other sites

Okay, yes I know this is a newbie question but I have looked in a TON of different places to find the answer to my question but I just cannot find it!

 

Question:

 

What does all this mean? (I think I know what the Field thing is, the name of the field, the name that pops up when somebody searches the Table.)

 

Please try to tell me what it all means in simple terms :-P

 

untitled-3.jpg

untitled1.jpg

 

Thanks!

 

 

Anyone?
Link to comment
Share on other sites

 

I tried that Tutorial and it didn't work. I tried the little Test thingy it tells you to try and all I got was:

 

Error
SQL query: 

CREATE TABLE `People` (

`id` INT( 6 ) NOT NULL DEFAULT '0' AUTO_INCREMENT PRIMARY KEY ,
`name` CHAR( 100 ) NOT NULL ,
`telephone` CHAR( 50 ) NOT NULL ,
`birthday` CHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `name` , `telephone` ) 
) TYPE = MYISAM 

MySQL said:  

#1068 - Multiple primary key defined 

Link to comment
Share on other sites

everyone starts from somewhere....

 

first you want to make a field

 

just call you first field "field" or something

type a number into the Length/Values* textfield id recommend 255 for now, this lets you only use up to 255 characters or numbers in your field wen you put something inside it "dont touch anything else yet", you can now create you table.

 

now that you have created a table with a field in it look along the top for a tab saying "insert"

 

type something into the textbox and click "go", this will insert a row into your table inside the database

 

there are alot of things fields can do, first of all the different types,

"varchar" lets any characters and numbers including <>!"£$%^&*(){}[]#/\| can be inserted into the field

"tinyint" just means, a few numbers

"text" lets you use as much of anything that you want, if you use text you dont need any lengths or values

youll get to know the rest as you use them

dont ask me what attributes are for because i never use them myself

NULL just means weather the feild is left blank or if it has a deafault (put it on "NOT NULL" it doesnt really make a difference)

the "Default**" just means that everytime theres a new row made that feild automatically gets the thing you want put into it automatically

the Extra usually uses an auto_increasement function, this can only be enabled if that feild is the primary key (note: there can only be one primary key) if you put it one auto_increasement id advise you to put the feild type on int, this only allows numbers to be used in the feild, the auto increasement function lets makes the every new row automatically get +1, eg: if you use an id for something like a user id, everyone that registers will automatically get a new id,

thats most of the basics

 

hope you understand, if you dont mail me ;)

Link to comment
Share on other sites

Error
SQL query: 

CREATE TABLE `People` (

`id` INT( 6 ) NOT NULL DEFAULT '0' AUTO_INCREMENT PRIMARY KEY ,
`name` CHAR( 100 ) NOT NULL ,
`telephone` CHAR( 50 ) NOT NULL ,
`birthday` CHAR( 50 ) NOT NULL ,
PRIMARY KEY ( `name` , `telephone` ) 
) TYPE = MYISAM 

MySQL said:  

#1068 - Multiple primary key defined 

 

That query is nowhere in that tutorial. o.O

 

I suggest you read the MySQL manual, and learn how to form manual queries before you try something like phpMyAdmin.

 

And either way, doesn't this belong in the 3rd party scripts forum?

Link to comment
Share on other sites

Okay, I got all my fields working. ^-^ What I'm using this for is for users of my website to be able to search for items from a MMORPG... It's a fansite.

 

1 More Question. Whenever 1 of the users of my website looks at 1 of my 'fields' or whatever with all the info in it, how do I make the info go into a table with columns and rows?

Link to comment
Share on other sites

ok

 

apart from the actual code ( use a tutorial ) it would look something like this

 

 

$SQL = SELECT field1, 2, 3, 4, ,5 FROM TABLE 1

$QUERY = mysql_query($CONNECTION VARIABLE, $SQL)

 

mysqli_fetch_array($QUERY)

 

this array contains all the info from the database query ie the first request

 

to display all the entries it would look something like

 

 

while($row = mysql_fetch_array($QUERY)) { ## ignore the previous fetch array if using ths loop, you only need it once

 

echo $row['field1']

echp $row['4']

 

 

etc

 

 

you put the infprmation into HTML tables if you want a table

 

 

BUT THIS SHOULD ALL BE IN A TUTORIAL SOMEWHERE.

 

but i recommend google "php, mysql querys "

or something like that

 

 

good luck

Link to comment
Share on other sites

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.