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
phpmyAdmin
Moderator: General Moderators
phpmyAdmin
- Attachments
-
- phpMyAdmin.png (18.59 KiB) Viewed 2021 times
Re: phpmyAdmin
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.toonbone wrote:First, why are there two columns with the same fields. I only want to define one column of the table.
http://dev.mysql.com/doc/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?
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.
Re: phpmyAdmin
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
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
- ganesh_dabhade
- Forum Newbie
- Posts: 19
- Joined: Sun Feb 06, 2011 12:42 am
- Contact:
Re: phpmyAdmin
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.
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.
Re: phpmyAdmin
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
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156
Re: phpmyAdmin
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.
Re: phpmyAdmin
In programming, to replace spaces, I do it kind of like this: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.
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
------------------------------------
Web Developer | Software Developer
https://kalebklein.com
PGP Key: https://keybase.io/pazuzu156