phpmyAdmin

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
toonbone
Forum Newbie
Posts: 4
Joined: Thu Jan 20, 2011 10:21 am

phpmyAdmin

Post by toonbone »

I'm just starting out with PHP/MySQL and the phpMyAdmin screen for the 3.3.9 version I'm running is not at all intuitive. I've created a database and a table and now I'd like to define the columns for the table. But the screen display, shown in the attachment, is not clear.

First, why are there two columns with the same fields. I only want to define one column of the table.

Second, I see "Collation" fields but I have no idea what that means to MySQL or what I'm supposed to enter there.

Third, where is the manual/documentation for all this?

Thanks for any help.

Steve
Attachments
phpMyAdmin.png
phpMyAdmin.png (18.59 KiB) Viewed 2021 times
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: phpmyAdmin

Post by josh »

toonbone wrote:First, why are there two columns with the same fields. I only want to define one column of the table.
Just ignore the other column, leave it blank & it will ignore it.. You told it to give you fields for 2 columns when you asked for the "create table" form.
Second, I see "Collation" fields but I have no idea what that means to MySQL or what I'm supposed to enter there.

Third, where is the manual/documentation for all this?
http://dev.mysql.com/doc/

Collation is a way of comparing strings of differing character sets. Character sets represent characters with different underlying binary data. A simple binary comparison may say two strings that should be the same are not, if they were of differing character sets and you didn't collate properly.
toonbone
Forum Newbie
Posts: 4
Joined: Thu Jan 20, 2011 10:21 am

Re: phpmyAdmin

Post by toonbone »

Thanks Josh.

One more thing: What are the limitations on a table column name? Can I include spaces? Can I end it with a question mark? And where is this documented?

Thanks for your help.

Steve
User avatar
ganesh_dabhade
Forum Newbie
Posts: 19
Joined: Sun Feb 06, 2011 12:42 am
Contact:

Re: phpmyAdmin

Post by ganesh_dabhade »

U can find documentation at http://dev.mysql.com/doc/ and locate ur version of mysql

It's better to use lowercase letter to use as column name however, u can try anything and sql will throwout the error.

For best practice, u can create a test table and do what u want to it. If anything goes wrong, delete the table and create it again. Do this if u don't have important data.
Keep it in mind that u have to do some things in ur life urself. It's upto u whether to take a risk or not.
User avatar
Pazuzu156
Forum Contributor
Posts: 241
Joined: Sat Nov 20, 2010 9:00 pm
Location: GA, USA
Contact:

Re: phpmyAdmin

Post by Pazuzu156 »

Also, depending on what you are doing I would set and id for the first column in the table, auto-increment it and set that as your primary key, phpMyAdmin will ask for a primary key within your tables.
- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
erupt
Forum Commoner
Posts: 58
Joined: Sat Feb 25, 2006 10:24 am

Re: phpmyAdmin

Post by erupt »

toonbone wrote:Thanks Josh.

One more thing: What are the limitations on a table column name? Can I include spaces? Can I end it with a question mark? And where is this documented?

Thanks for your help.

Steve

Not sure if you can include spaces or not but you want to stay away from spaces regardless. Replace any spaces with underscores.
User avatar
Pazuzu156
Forum Contributor
Posts: 241
Joined: Sat Nov 20, 2010 9:00 pm
Location: GA, USA
Contact:

Re: phpmyAdmin

Post by Pazuzu156 »

erupt wrote:Not sure if you can include spaces or not but you want to stay away from spaces regardless. Replace any spaces with underscores.
In programming, to replace spaces, I do it kind of like this:

public void myFunction() {
//Code to run
}

It is used the same way in web design.
- Kaleb Klein
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
Post Reply