Difference between revisions of "PHP-and-MySQL/C3/MySQL-Part-1/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{| border=1 !Time !Narration |- |00:00 |Hi everyone! |- |00:01 |This is a pure My SQL php tutorial. |- |00:07 |I will teach you the basics of connecting, retrieving data, handlin…')
 
Line 3: Line 3:
 
!Narration
 
!Narration
 
|-
 
|-
|00:00
+
|00:01
 
|Hi everyone!
 
|Hi everyone!
 
|-
 
|-
|00:01
+
|00:03
 
|This is a pure My SQL php tutorial.
 
|This is a pure My SQL php tutorial.
 
|-
 
|-
|00:07
+
|00:06
 
|I will teach you the basics of connecting, retrieving data, handling errors and modifying data.
 
|I will teach you the basics of connecting, retrieving data, handling errors and modifying data.
 
|-  
 
|-  
|00:15
+
|00:12
 
|So that will cover some SQL code and some SQL queries.
 
|So that will cover some SQL code and some SQL queries.
 
|-
 
|-
|00:21
+
|00:17
 
|Ok! Lets start.
 
|Ok! Lets start.
 
|-
 
|-
|00:24
+
|00:19
 
|Here I am going to show the directory structure of "mysql"
 
|Here I am going to show the directory structure of "mysql"
 
|-
 
|-
|00:27
+
|00:23
 
|and we will create a couple of files here.
 
|and we will create a couple of files here.
 
|-
 
|-
Line 27: Line 27:
 
|I will create the first file and call it "connect.php".
 
|I will create the first file and call it "connect.php".
 
|-
 
|-
|00:34
+
|00:33
 
|I will come here, click on the folder called "mysql" and Save this as "connect.php"
 
|I will come here, click on the folder called "mysql" and Save this as "connect.php"
 
|-
 
|-
|00:40
+
|00:39
 
|Now here we will create a separate file and include with every page that we use.
 
|Now here we will create a separate file and include with every page that we use.
 
|-
 
|-
|00:46
+
|00:45
 
|This is a lot easier to connect to your database
 
|This is a lot easier to connect to your database
 
|-
 
|-
|00:50
+
|00:48
 
|What we will do is type our "include" function and specify this file.
 
|What we will do is type our "include" function and specify this file.
 
|-
 
|-
|00:55
+
|00:53
 
|I will create another file which is my main "mysql" file
 
|I will create another file which is my main "mysql" file
 
|-
 
|-
|01:02
+
|00:57
 
|with a code that I will show you all.
 
|with a code that I will show you all.
 
|-
 
|-
|01:03
+
|00:59
 
|Ok so I have got my mysql dot php open.
 
|Ok so I have got my mysql dot php open.
 
|-
 
|-
|01:07
+
|01:03
 
|This is php codes and we need the php tags and the same will connect to php
 
|This is php codes and we need the php tags and the same will connect to php
 
|-
 
|-
|01:13
+
|01:10
 
|I will explain this "include" function in a minute.
 
|I will explain this "include" function in a minute.
 
|-
 
|-
|01:18
+
|01:16
 
|First, I will teach you how to connect to the database.
 
|First, I will teach you how to connect to the database.
 
|-
 
|-
|01:23
+
|01:20
 
|If you don't know where you have it stored on your webserver, then I suggest you check out an application called phpmyadmin.
 
|If you don't know where you have it stored on your webserver, then I suggest you check out an application called phpmyadmin.
 
|-
 
|-
|01:38
+
|01:28
 
|It is a database interface php written program or in other words a script.
 
|It is a database interface php written program or in other words a script.
 
|-
 
|-
|01:44
+
|01:35
 
|Here we will look at the inside of my database, my service.
 
|Here we will look at the inside of my database, my service.
 
|-
 
|-
|01:51
+
|01:41
 
|Rather my server, My SQL server.  It gives our table information, our database information and information about my server etc etc.
 
|Rather my server, My SQL server.  It gives our table information, our database information and information about my server etc etc.
 
|-
 
|-
|02:03
+
|01:55
 
|Although, we don't need to know about it, this is a good start to a program, if you are just starting to use a php mysql or just mysql in general.
 
|Although, we don't need to know about it, this is a good start to a program, if you are just starting to use a php mysql or just mysql in general.
 
|-
 
|-
|02:10
+
|02:06
 
|It is a good way to start interfacing with your database, instead of using the command line to do things.
 
|It is a good way to start interfacing with your database, instead of using the command line to do things.
 
|-
 
|-
|02:17
+
|02:13
 
|Using command line could be difficult for the first timers.
 
|Using command line could be difficult for the first timers.
 
|-
 
|-
|02:21
+
|02:18
 
|Ok, so what we see here are, our databases.
 
|Ok, so what we see here are, our databases.
 
|-
 
|-
|02:25
+
|02:23
 
|I have got one called "phpacademy" and I have got one called "phplogin" which I mentioned in another  tutorial that I have created.
 
|I have got one called "phpacademy" and I have got one called "phplogin" which I mentioned in another  tutorial that I have created.
 
|-
 
|-
|02:30
+
|02:31
 
|The others are just a standard.
 
|The others are just a standard.
 
|-
 
|-
|02:32
+
|02:34
 
|They are just for holding data.
 
|They are just for holding data.
 
|-
 
|-
|02:33
+
|02:36
 
|Don't delete them.
 
|Don't delete them.
 
|-
 
|-
|02:36
+
|02:38
 
|All you need to do is create new databases.  
 
|All you need to do is create new databases.  
 
|-
 
|-
|02:39
+
|02:41
 
|To do this, you have got a simple box here.  
 
|To do this, you have got a simple box here.  
 
|-
 
|-
|02:41
+
|02:45
 
|We are just going to create databases.
 
|We are just going to create databases.
 
|-
 
|-
|02:43
+
|02:47
 
|I will work within my php academy database for now.
 
|I will work within my php academy database for now.
 
|-
 
|-
Line 117: Line 117:
 
|You type in the name and click on "Create".
 
|You type in the name and click on "Create".
 
|-
 
|-
|02:59
+
|02:58
 
|My php has already been created here.
 
|My php has already been created here.
 
|-
 
|-
|03:00
+
|03:01
 
|So I will use this one.  
 
|So I will use this one.  
 
|-
 
|-
Line 126: Line 126:
 
|Click on it and you can see that there are several tables inside.
 
|Click on it and you can see that there are several tables inside.
 
|-
 
|-
|03:06
+
|03:08
 
|This is denoted by the symbol here when using phpmyadmin.
 
|This is denoted by the symbol here when using phpmyadmin.
 
|-
 
|-
|03:09
+
|03:15
 
|This is guestbook from my guestbook tutorial.
 
|This is guestbook from my guestbook tutorial.
 
|-
 
|-
|03:12
+
|03:21
 
|Now I will create a new table on this database for the specifics of this tutorial and I shall call it "people".
 
|Now I will create a new table on this database for the specifics of this tutorial and I shall call it "people".
 
|-
 
|-
|03:28
+
|03:30
 
|The number of fields is quite important.  
 
|The number of fields is quite important.  
 
|-
 
|-
|03:31
+
|03:33
 
|You can't leave this blank.
 
|You can't leave this blank.
 
|-
 
|-
|03:32
+
|03:35
 
|The number of fields on your table is for storing each column of data.
 
|The number of fields on your table is for storing each column of data.
 
|-
 
|-
|03:41
+
|03:42
 
|For example, the first one usually when you are dealing with records, you can have an ID which is a numerical value.
 
|For example, the first one usually when you are dealing with records, you can have an ID which is a numerical value.
 
|-
 
|-
|03:47
+
|03:51
 
|So it is a number that is going to increment each time.
 
|So it is a number that is going to increment each time.
 
|-
 
|-
|03:50
+
|03:56
 
|It will allow you to reference your records being stored individually by the unique number.  
 
|It will allow you to reference your records being stored individually by the unique number.  
 
|-
 
|-
|03:59
+
|04:02
 
|And usually set this to the primary key.  
 
|And usually set this to the primary key.  
 
|-
 
|-
|04:01
+
|04:06
 
|If you are not familiar with the databases, you need to start looking out for terms like primary key.
 
|If you are not familiar with the databases, you need to start looking out for terms like primary key.
 
|-
 
|-
|04:08
+
|04:14
 
|I will not be dealing with secondary keys because its quite flexible way to do this anyway with mysql database.
 
|I will not be dealing with secondary keys because its quite flexible way to do this anyway with mysql database.
 
|-
 
|-
|04:16
+
|04:22
|Just read up on databases in general, if you have Microsoft access or any other database program.  
+
|Just read up on databases in general, if you have Microsoft access or any other database .  
 
|-
 
|-
|04:25
+
|04:29
 
|I suggest you to learn about groups of database.
 
|I suggest you to learn about groups of database.
 
|-
 
|-
|04:29
+
|04:34
 
|Ok, so the number of fields depends on how much data you want to store and what data you want to store.  
 
|Ok, so the number of fields depends on how much data you want to store and what data you want to store.  
 
|-
 
|-
|04:36
+
|04:39
 
|Usually when I am creating fields, I will bring out an usual blank document.  
 
|Usually when I am creating fields, I will bring out an usual blank document.  
 
|-
 
|-
|04:40
+
|04:44
 
|And I will start by typing out the fields that I want.
 
|And I will start by typing out the fields that I want.
 
|-
 
|-
|04:43
+
|04:47
 
|The first one is always going be ID.
 
|The first one is always going be ID.
 
|-
 
|-
|04:45
+
|04:50
 
|This is a self incrementing value every time I create a new record.
 
|This is a self incrementing value every time I create a new record.
 
|-
 
|-
|04:50
+
|04:55
 
|So it will be 1 for the first record, 2,3,4 and the data will be stored after this.
 
|So it will be 1 for the first record, 2,3,4 and the data will be stored after this.
 
|-
 
|-
|04:58
+
|05:00
 
|It is a very useful field.
 
|It is a very useful field.
 
|-
 
|-
|05:01
+
|05:02
 
|Since my table is called "people", I will store some data about people.
 
|Since my table is called "people", I will store some data about people.
 
|-
 
|-
|05:07
+
|05:08
|So I will first type in the firstname and then I will type in the lastname and then age and then gender.
+
|So I will first type in the firstname and then I will type in the lastname and then the age and the  gender.
 
|-
 
|-
|05:16
+
|05:17
 
|We can leave it there for now, to keep it simple.
 
|We can leave it there for now, to keep it simple.
 
|-
 
|-
Line 207: Line 207:
 
|It will also be great to see a pop up here in a minute.  
 
|It will also be great to see a pop up here in a minute.  
 
|-
 
|-
|05:32
+
|05:31
 
|No you won't because we haven't created our field names yet.
 
|No you won't because we haven't created our field names yet.
 
|-
 
|-
Line 213: Line 213:
 
|Ok! We have a standard here.
 
|Ok! We have a standard here.
 
|-
 
|-
|05:37
+
|05:38
 
|There are a lot of options for these.
 
|There are a lot of options for these.
 
|-
 
|-
Line 219: Line 219:
 
|But, a field is a fieldname.
 
|But, a field is a fieldname.
 
|-
 
|-
|05:41
+
|05:42
 
|So the first one is going to be "ID".
 
|So the first one is going to be "ID".
 
|-
 
|-
|05:43
+
|05:45
 
|The type is the data type, that you want to store this field in.
 
|The type is the data type, that you want to store this field in.
 
|-
 
|-
|05:47
+
|05:49
 
|Anything that goes into it must be added here to this datatype.
 
|Anything that goes into it must be added here to this datatype.
 
|-
 
|-
|05:50
+
|05:54
 
|"varchar" which stands for variable characters is quite common.  It is a very useful one and it requires a length.
 
|"varchar" which stands for variable characters is quite common.  It is a very useful one and it requires a length.
 
|-
 
|-
|05:57
+
|06:00
 
|We can have 25 characters long here.
 
|We can have 25 characters long here.
 
|-
 
|-
|06:00
+
|06:03
|You could have 250 characters long.
+
| 50 characters long.
 
|-
 
|-
 
|06:02
 
|06:02
Line 243: Line 243:
 
|Or 1 character long.
 
|Or 1 character long.
 
|-
 
|-
|06:06
+
|06:07
 
|Actually we are just storing the type and the length of the data stored.
 
|Actually we are just storing the type and the length of the data stored.
 
|-
 
|-
Line 249: Line 249:
 
|It helps in storing, for example your firstname.  
 
|It helps in storing, for example your firstname.  
 
|-
 
|-
|06:19
+
|06:17
 
|Lets say our fieldname here is "firstname" and I have a "varchar".  
 
|Lets say our fieldname here is "firstname" and I have a "varchar".  
 
|-
 
|-
Line 255: Line 255:
 
|There is no point in typing in 500 characters because we will be using unnecessary amount of data.  
 
|There is no point in typing in 500 characters because we will be using unnecessary amount of data.  
 
|-
 
|-
|06:33
+
|06:32
|A typical firstname will not be more than 25 characters.
+
|A typical firstname will be no  more than 25 characters.
 
|-
 
|-
|06:37
+
|06:36
 
|Even if it is, it will not be more than 30 or 35 characters.
 
|Even if it is, it will not be more than 30 or 35 characters.
 
|-
 
|-
|06:42
+
|06:41
|But for now I will store my "firstname" as 20 or 25 characters, I will put 20 here.  
+
|But for now I will store my "firstname" as 20 to 25 characters and I will put 20 here.  
 
|-
 
|-
 
|06:48
 
|06:48
 
|Our "ID" will be an integer because it is a number.
 
|Our "ID" will be an integer because it is a number.
 
|-
 
|-
|06:54
+
|06:53
 
|It will be self incrementing.
 
|It will be self incrementing.
 
|-
 
|-
Line 273: Line 273:
 
|This will be 1,2,3,4
 
|This will be 1,2,3,4
 
|-
 
|-
|06:56
+
|06:57
 
|The amount of records we use.  
 
|The amount of records we use.  
 
|-
 
|-
|06:57
+
|07:00
 
|And we have some other options here.
 
|And we have some other options here.
 
|-
 
|-
|07:02
+
|07:03
|Now this here is primary key.
+
That is here is primary key.
 
|-
 
|-
|07:04
+
|07:05
 
|We are going to select it and at extra, we can see that we got "auto underscore increment".
 
|We are going to select it and at extra, we can see that we got "auto underscore increment".
 
|-
 
|-
|07:09
+
|07:11
 
|This is an auto increment.  
 
|This is an auto increment.  
 
|-
 
|-
|07:11
+
|07:13
 
|It will give this particular function.  
 
|It will give this particular function.  
 
|-
 
|-
|07:13
+
|07:16
 
|Whenever you enter a new record, this will also automatically go up.
 
|Whenever you enter a new record, this will also automatically go up.
 
|-
 
|-
|07:19
+
|07:21
 
|So here we have "firstname".
 
|So here we have "firstname".
 
|-
 
|-
|07:21
+
|07:23
 
|We have "lastname" and again I will set this as 30.
 
|We have "lastname" and again I will set this as 30.
 
|-
 
|-
|07:26
+
|07:27
 
|And what else do we have???
 
|And what else do we have???
 
|-
 
|-
|07:28
+
|07:29
 
|We have "age" and obviously this is an integer and we have "gender".
 
|We have "age" and obviously this is an integer and we have "gender".
 
|-
 
|-
Line 309: Line 309:
 
|Ok.
 
|Ok.
 
|-
 
|-
|07:36
+
|07:35
 
|Now here instead of "age", I will say say "Date of birth".
 
|Now here instead of "age", I will say say "Date of birth".
 
|-
 
|-
Line 315: Line 315:
 
|So this is Date of Birth.
 
|So this is Date of Birth.
 
|-
 
|-
|07:44
+
|07:43
 
|I will set this as date.  
 
|I will set this as date.  
 
|-
 
|-
|07:46
+
|07:45
 
|Here I am  trying to find a date datatype and I will see how this works.
 
|Here I am  trying to find a date datatype and I will see how this works.
 
|-
 
|-
|07:52
+
|07:51
 
|So our length for date doesn't have to be set here.
 
|So our length for date doesn't have to be set here.
 
|-
 
|-
|07:55
+
|07:54
 
|We have a standard format for this. So we don't have to worry about that.
 
|We have a standard format for this. So we don't have to worry about that.
 
|-
 
|-
|08:00
+
|07:58
 
|Now I will set the "gender" as "varchar" of character 1.
 
|Now I will set the "gender" as "varchar" of character 1.
 
|-
 
|-
|08:07
+
|08:05
 
|Now we can store "M" for male and "F" for female.
 
|Now we can store "M" for male and "F" for female.
 
|-
 
|-
Line 336: Line 336:
 
|Ok. If we go across here, we can see that there are a lots of options.  
 
|Ok. If we go across here, we can see that there are a lots of options.  
 
|-
 
|-
|08:18
+
|08:16
 
|You can comment this yourself.
 
|You can comment this yourself.
 
|-
 
|-
Line 345: Line 345:
 
|But usually name your fieldname appropriately so you know what data you are saving.
 
|But usually name your fieldname appropriately so you know what data you are saving.
 
|-
 
|-
|08:26
+
|08:28
 
|Ok. Here I will click on "Save" and you can see that "people" has appeared here.
 
|Ok. Here I will click on "Save" and you can see that "people" has appeared here.
 
|-
 
|-
Line 354: Line 354:
 
|Now when I was talking about command line earlier, this is what you have to type to create that.
 
|Now when I was talking about command line earlier, this is what you have to type to create that.
 
|-
 
|-
|08:41
+
|08:46
 
|However, we have used a graphic user interface to save ours.
 
|However, we have used a graphic user interface to save ours.
 
|-
 
|-
|08:45
+
|08:50
 
|We can see down here, we have our fields, our types and our collation attributes, null data for example.
 
|We can see down here, we have our fields, our types and our collation attributes, null data for example.
 
|-
 
|-
|08:52
+
|08:59
 
|The default value that is stored as.... say for example if you had a field saying "Has the user registered?"  
 
|The default value that is stored as.... say for example if you had a field saying "Has the user registered?"  
 
|-
 
|-
|09:02
+
|09:07
 
|Or anything of your choice.  You could use the default here too.
 
|Or anything of your choice.  You could use the default here too.
 
|-
 
|-
|09:13
+
|09:11
 
|For example if I wanted to store everyone, I have registered here as male by default or female by default, I could type "M" or "F" here.
 
|For example if I wanted to store everyone, I have registered here as male by default or female by default, I could type "M" or "F" here.
 
|-
 
|-
Line 372: Line 372:
 
|And we have auto increment here and also some other data that we don't need to know about in this tutorial.
 
|And we have auto increment here and also some other data that we don't need to know about in this tutorial.
 
|-
 
|-
|09:26
+
|09:28
 
|Ok here we have created our table and if you go in part II of this, I will show you how to insert some data and also how to retrieve this data from your database using php.
 
|Ok here we have created our table and if you go in part II of this, I will show you how to insert some data and also how to retrieve this data from your database using php.
 
|-
 
|-
|09:39
+
|09:40
 
|Join me in part 2. This is Evan Varkey dubbing for the Spoken Tutorial Project. (Script contributed by Juanita Jayakar).
 
|Join me in part 2. This is Evan Varkey dubbing for the Spoken Tutorial Project. (Script contributed by Juanita Jayakar).

Revision as of 11:48, 11 July 2013

Time Narration
00:01 Hi everyone!
00:03 This is a pure My SQL php tutorial.
00:06 I will teach you the basics of connecting, retrieving data, handling errors and modifying data.
00:12 So that will cover some SQL code and some SQL queries.
00:17 Ok! Lets start.
00:19 Here I am going to show the directory structure of "mysql"
00:23 and we will create a couple of files here.
00:29 I will create the first file and call it "connect.php".
00:33 I will come here, click on the folder called "mysql" and Save this as "connect.php"
00:39 Now here we will create a separate file and include with every page that we use.
00:45 This is a lot easier to connect to your database
00:48 What we will do is type our "include" function and specify this file.
00:53 I will create another file which is my main "mysql" file
00:57 with a code that I will show you all.
00:59 Ok so I have got my mysql dot php open.
01:03 This is php codes and we need the php tags and the same will connect to php
01:10 I will explain this "include" function in a minute.
01:16 First, I will teach you how to connect to the database.
01:20 If you don't know where you have it stored on your webserver, then I suggest you check out an application called phpmyadmin.
01:28 It is a database interface php written program or in other words a script.
01:35 Here we will look at the inside of my database, my service.
01:41 Rather my server, My SQL server. It gives our table information, our database information and information about my server etc etc.
01:55 Although, we don't need to know about it, this is a good start to a program, if you are just starting to use a php mysql or just mysql in general.
02:06 It is a good way to start interfacing with your database, instead of using the command line to do things.
02:13 Using command line could be difficult for the first timers.
02:18 Ok, so what we see here are, our databases.
02:23 I have got one called "phpacademy" and I have got one called "phplogin" which I mentioned in another tutorial that I have created.
02:31 The others are just a standard.
02:34 They are just for holding data.
02:36 Don't delete them.
02:38 All you need to do is create new databases.
02:41 To do this, you have got a simple box here.
02:45 We are just going to create databases.
02:47 I will work within my php academy database for now.
02:51 It is a lot easier.
02:53 So its creating a database now.
02:55 It is simple.
02:56 You type in the name and click on "Create".
02:58 My php has already been created here.
03:01 So I will use this one.
03:02 Click on it and you can see that there are several tables inside.
03:08 This is denoted by the symbol here when using phpmyadmin.
03:15 This is guestbook from my guestbook tutorial.
03:21 Now I will create a new table on this database for the specifics of this tutorial and I shall call it "people".
03:30 The number of fields is quite important.
03:33 You can't leave this blank.
03:35 The number of fields on your table is for storing each column of data.
03:42 For example, the first one usually when you are dealing with records, you can have an ID which is a numerical value.
03:51 So it is a number that is going to increment each time.
03:56 It will allow you to reference your records being stored individually by the unique number.
04:02 And usually set this to the primary key.
04:06 If you are not familiar with the databases, you need to start looking out for terms like primary key.
04:14 I will not be dealing with secondary keys because its quite flexible way to do this anyway with mysql database.
04:22 Just read up on databases in general, if you have Microsoft access or any other database .
04:29 I suggest you to learn about groups of database.
04:34 Ok, so the number of fields depends on how much data you want to store and what data you want to store.
04:39 Usually when I am creating fields, I will bring out an usual blank document.
04:44 And I will start by typing out the fields that I want.
04:47 The first one is always going be ID.
04:50 This is a self incrementing value every time I create a new record.
04:55 So it will be 1 for the first record, 2,3,4 and the data will be stored after this.
05:00 It is a very useful field.
05:02 Since my table is called "people", I will store some data about people.
05:08 So I will first type in the firstname and then I will type in the lastname and then the age and the gender.
05:17 We can leave it there for now, to keep it simple.
05:20 So here we can see that we have got 5 fields.
05:23 I shall go back here and type in 5 and click "Go".
05:28 It will also be great to see a pop up here in a minute.
05:31 No you won't because we haven't created our field names yet.
05:35 Ok! We have a standard here.
05:38 There are a lot of options for these.
05:40 But, a field is a fieldname.
05:42 So the first one is going to be "ID".
05:45 The type is the data type, that you want to store this field in.
05:49 Anything that goes into it must be added here to this datatype.
05:54 "varchar" which stands for variable characters is quite common. It is a very useful one and it requires a length.
06:00 We can have 25 characters long here.
06:03 50 characters long.
06:02 Or 100 characters long.
06:04 Or 1 character long.
06:07 Actually we are just storing the type and the length of the data stored.
06:14 It helps in storing, for example your firstname.
06:17 Lets say our fieldname here is "firstname" and I have a "varchar".
06:24 There is no point in typing in 500 characters because we will be using unnecessary amount of data.
06:32 A typical firstname will be no more than 25 characters.
06:36 Even if it is, it will not be more than 30 or 35 characters.
06:41 But for now I will store my "firstname" as 20 to 25 characters and I will put 20 here.
06:48 Our "ID" will be an integer because it is a number.
06:53 It will be self incrementing.
06:55 This will be 1,2,3,4
06:57 The amount of records we use.
07:00 And we have some other options here.
07:03

That is here is primary key.

07:05 We are going to select it and at extra, we can see that we got "auto underscore increment".
07:11 This is an auto increment.
07:13 It will give this particular function.
07:16 Whenever you enter a new record, this will also automatically go up.
07:21 So here we have "firstname".
07:23 We have "lastname" and again I will set this as 30.
07:27 And what else do we have???
07:29 We have "age" and obviously this is an integer and we have "gender".
07:34 Ok.
07:35 Now here instead of "age", I will say say "Date of birth".
07:40 So this is Date of Birth.
07:43 I will set this as date.
07:45 Here I am trying to find a date datatype and I will see how this works.
07:51 So our length for date doesn't have to be set here.
07:54 We have a standard format for this. So we don't have to worry about that.
07:58 Now I will set the "gender" as "varchar" of character 1.
08:05 Now we can store "M" for male and "F" for female.
08:12 Ok. If we go across here, we can see that there are a lots of options.
08:16 You can comment this yourself.
08:19 You can remind yourself what this field does.
08:22 But usually name your fieldname appropriately so you know what data you are saving.
08:28 Ok. Here I will click on "Save" and you can see that "people" has appeared here.
08:35 This will ask you a query here.
08:38 Now when I was talking about command line earlier, this is what you have to type to create that.
08:46 However, we have used a graphic user interface to save ours.
08:50 We can see down here, we have our fields, our types and our collation attributes, null data for example.
08:59 The default value that is stored as.... say for example if you had a field saying "Has the user registered?"
09:07 Or anything of your choice. You could use the default here too.
09:11 For example if I wanted to store everyone, I have registered here as male by default or female by default, I could type "M" or "F" here.
09:21 And we have auto increment here and also some other data that we don't need to know about in this tutorial.
09:28 Ok here we have created our table and if you go in part II of this, I will show you how to insert some data and also how to retrieve this data from your database using php.
09:40 Join me in part 2. This is Evan Varkey dubbing for the Spoken Tutorial Project. (Script contributed by Juanita Jayakar).

Contributors and Content Editors

Minal, PoojaMoolya, Pratik kamble, Sakinashaikh, Sandhya.np14, Sneha