Page 1 of 1
phpmyAdmin
Posted: Wed Feb 09, 2011 7:33 pm
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
Re: phpmyAdmin
Posted: Wed Feb 09, 2011 7:50 pm
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.
Re: phpmyAdmin
Posted: Wed Feb 09, 2011 8:27 pm
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
Re: phpmyAdmin
Posted: Sun Feb 20, 2011 7:50 am
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.
Re: phpmyAdmin
Posted: Tue Feb 22, 2011 8:00 am
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.
Re: phpmyAdmin
Posted: Sat Mar 05, 2011 12:34 pm
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.
Re: phpmyAdmin
Posted: Sun Mar 06, 2011 2:38 pm
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.