1
00:00:00,780 --> 00:00:07,200
Hello, everyone, in the last video, I have shown you how you can enter or how you can insert data

2
00:00:07,200 --> 00:00:10,420
in your database or in your table, which is user here.

3
00:00:11,010 --> 00:00:16,430
Now, I will show you how you can bring that data and work with it or use it in your program.

4
00:00:16,770 --> 00:00:23,110
So to do this, we have to use just simple command, which is always executed.

5
00:00:23,130 --> 00:00:27,930
So here's the dot executed here.

6
00:00:28,080 --> 00:00:33,960
We will change just this key word, which is that here we have inserted because we are we was inserting

7
00:00:34,470 --> 00:00:39,500
the data into the the you the database now we selected.

8
00:00:39,990 --> 00:00:43,720
So we will just try to select this is the keyword.

9
00:00:43,740 --> 00:00:49,600
Then we will tape start, which means all the stuff, all what we have.

10
00:00:49,650 --> 00:00:54,090
So we will select all what we have in this this keyword.

11
00:00:54,190 --> 00:00:55,020
I don't know.

12
00:00:55,020 --> 00:00:58,230
Actually, I don't know what you mean really what it means, this one.

13
00:00:58,440 --> 00:01:08,010
But if we select start then I mean does select all the rows or all we have, we have to say those because

14
00:01:08,010 --> 00:01:10,140
we have here this is our table.

15
00:01:10,150 --> 00:01:20,880
So we will select on this row and this extra self select on two rows from our table, which is user.

16
00:01:20,910 --> 00:01:23,990
So we will select all the rows from users.

17
00:01:24,510 --> 00:01:33,480
Now after the after, when we select it, we have to fetch it, which will fetch this on all what we

18
00:01:33,480 --> 00:01:34,740
have in the table we have to do.

19
00:01:34,750 --> 00:01:41,790
There is a function called Fetcher, so concerned that fetch or fetch all means that we will bring on

20
00:01:41,790 --> 00:01:44,010
what we have in the database.

21
00:01:44,640 --> 00:01:51,900
So actually, if we have if we will bring all what we have here, it will be like a matrix like this.

22
00:01:51,900 --> 00:02:00,060
So we have this lines and rows, so we will have a table in a table or can see an array or a list.

23
00:02:00,270 --> 00:02:03,180
And inside this list we have another race.

24
00:02:03,390 --> 00:02:06,110
So we have the first one, the second one exit row.

25
00:02:06,360 --> 00:02:13,680
So we have the main list and inside we have the user list, use it while easier to draw, etc. So to

26
00:02:13,950 --> 00:02:15,690
this function will bring all this.

27
00:02:15,690 --> 00:02:19,620
So to work with this what we want, there is two ways.

28
00:02:19,620 --> 00:02:22,650
For example, if we want to print it, we have just right.

29
00:02:22,650 --> 00:02:26,670
For example, print than this one.

30
00:02:26,940 --> 00:02:28,860
I forgot the print.

31
00:02:29,130 --> 00:02:35,930
So print version of that, which means that we will print all what we have as data in our database or

32
00:02:36,070 --> 00:02:38,170
our in our table, which means table users.

33
00:02:38,430 --> 00:02:39,720
So here I will use this.

34
00:02:39,720 --> 00:02:46,070
We have the first user, second, etc. You can see that there is a lot of users with the same Liljana

35
00:02:46,410 --> 00:02:52,920
because here we have written this and we didn't take it or we didn't delete it.

36
00:02:52,930 --> 00:02:56,980
So in every time we design the program, we will create another one.

37
00:02:57,000 --> 00:03:01,710
So but I didn't want to take it off because it doesn't matter.

38
00:03:02,100 --> 00:03:09,630
So in this, as you can see, we have always this index, which is one and two, which is this and this

39
00:03:09,630 --> 00:03:12,580
is that you want that I told you about.

40
00:03:12,780 --> 00:03:14,410
So this is the first item.

41
00:03:14,430 --> 00:03:16,800
This is the second item turned, etc..

42
00:03:17,130 --> 00:03:18,660
So this is the first user.

43
00:03:18,660 --> 00:03:19,500
Second user.

44
00:03:20,100 --> 00:03:27,050
We can send items, but in our example, we can say the user user, one user to execute.

45
00:03:28,080 --> 00:03:35,060
So now if we do this, we have we have selected all what we had and we print it.

46
00:03:35,310 --> 00:03:41,340
But if I want to have if I want to select just one user, for example, just this user or just this

47
00:03:41,340 --> 00:03:41,590
one.

48
00:03:42,000 --> 00:03:43,720
So what what should I do?

49
00:03:43,980 --> 00:03:49,630
So the first thing that I have to do is to put all the data that we bring it in.

50
00:03:50,020 --> 00:03:57,900
So I will call it, for example, I don't know, users equal that search on.

51
00:03:58,290 --> 00:04:03,780
So this user now is like a matrix that has all what we have.

52
00:04:04,680 --> 00:04:10,950
It has all this table, all the arrays or all the rules from this one to the end.

53
00:04:12,090 --> 00:04:13,350
No, what should we have?

54
00:04:13,680 --> 00:04:14,550
What should we do?

55
00:04:14,880 --> 00:04:18,190
As I told you, I want just for example, just this one, just this user.

56
00:04:18,720 --> 00:04:25,770
So if we have an array and we want to take just the first or we have a list and you want to take just

57
00:04:25,770 --> 00:04:32,250
the first item of this list, we have to write, for example, if you have list table, sorry, not

58
00:04:32,250 --> 00:04:32,580
here.

59
00:04:33,120 --> 00:04:40,950
If we have list a table and this is our list, if I want to select, I want you to show me show, for

60
00:04:40,950 --> 00:04:43,820
example, two, three, four, five.

61
00:04:44,340 --> 00:04:51,120
Now, if I want to select this item, I have to just write, for example, table table.

62
00:04:51,400 --> 00:04:53,510
And here we have to write zero.

63
00:04:53,670 --> 00:04:56,130
If so, happy table with the index.

64
00:04:56,130 --> 00:04:59,240
Zero will take the first item.

65
00:04:59,280 --> 00:04:59,560
Sorry.

66
00:04:59,580 --> 00:04:59,820
And.

67
00:05:00,030 --> 00:05:04,850
I will win my mate here, table one, we will have the second exit row.

68
00:05:05,220 --> 00:05:11,280
So in the in the database we like, it works at the same time.

69
00:05:11,640 --> 00:05:16,870
If here we have users, users is table we all these users.

70
00:05:17,070 --> 00:05:20,970
So if I want to select just this user means that users

71
00:05:23,130 --> 00:05:31,360
users already here zero if I will put user zero means that I want the first user on the first row.

72
00:05:31,710 --> 00:05:41,640
So if I want to print it so we have just to erase print then this one, if we print it you will see

73
00:05:41,640 --> 00:05:43,470
that we had the first user.

74
00:05:43,680 --> 00:05:50,000
If we want the second, we just hear one and you can see this is the second exit.

75
00:05:50,010 --> 00:05:55,830
You know, if I want to select just the first name, for example, just the first name, as you can

76
00:05:55,830 --> 00:06:05,130
see, if we have for example, I will show you if we have, I don't know, table that have this table

77
00:06:05,220 --> 00:06:11,310
that has a lot of like a matrix, which means that there is a list inside the list.

78
00:06:11,460 --> 00:06:17,140
So if we want to select, for example, the first item, we would just like we could, for example,

79
00:06:17,140 --> 00:06:23,810
like this zero zero and zero means that we will select the first item of our matrix.

80
00:06:24,150 --> 00:06:25,590
The same thing if we are here.

81
00:06:25,770 --> 00:06:32,970
We had this is like a matrix, this is table or this is the user's zero with the index zero.

82
00:06:33,360 --> 00:06:42,360
And in the new the in the user zero, we want to take the first item, which is zero zero means that

83
00:06:42,360 --> 00:06:43,890
we have we have to write like this.

84
00:06:43,890 --> 00:06:48,290
For example, for the first name we will take table users.

85
00:06:48,300 --> 00:06:52,890
Zero and zero means the first row and the first column.

86
00:06:54,120 --> 00:07:07,920
So if we want to print it, we have to just try to print three frames then users zero and zero zero.

87
00:07:08,280 --> 00:07:17,230
If we write this, we will select this item, this so this item on this side of this first name.

88
00:07:17,550 --> 00:07:20,850
So here we have this first name if you want to select the last name.

89
00:07:21,120 --> 00:07:22,560
So we put here one.

90
00:07:23,220 --> 00:07:30,080
As you can see, this is the name if I want to select the age of of this person.

91
00:07:30,510 --> 00:07:36,270
So if this user we have this user have the first name, last name and age, if we want to select this

92
00:07:36,270 --> 00:07:41,210
age, means that Road Zero and the column two.

93
00:07:41,700 --> 00:07:43,530
So here we have zero and two.

94
00:07:43,680 --> 00:07:50,850
And if we run it, we will see that we have H if we want to select second person or second user which

95
00:07:50,850 --> 00:07:54,660
is here one and the first name, which is zero.

96
00:07:55,080 --> 00:08:04,560
And you can see and we have Li and for the last name here, John and for the age we have here, twenty

97
00:08:04,560 --> 00:08:04,820
two.

98
00:08:05,730 --> 00:08:10,620
So that's was for the, for the database.

99
00:08:10,620 --> 00:08:15,570
If we want to bring meaning or select something it works like the arrays means that there is a list

100
00:08:15,570 --> 00:08:16,380
inside the list.

101
00:08:16,620 --> 00:08:18,240
So we were just like a matrix.

102
00:08:18,870 --> 00:08:20,250
So that was for today.

103
00:08:20,370 --> 00:08:23,910
And I see you in the next video say saved by.
