WEBVTT 00:00.360 --> 00:01.190 Welcome back guys. 00:01.190 --> 00:04.560 Now in this lecture let us fetch our data from our database. 00:04.560 --> 00:05.190 Before that. 00:05.190 --> 00:07.100 Let me add some more data in my database. 00:07.110 --> 00:11.460 I realized one field would be quite close so I just added these three lines. 00:11.460 --> 00:12.330 That is INSIGHT. 00:12.390 --> 00:14.360 We can do bulk query also. 00:14.370 --> 00:20.240 What I am doing the simple thing and let me execute this one that's done. 00:20.290 --> 00:26.190 And if I go to my database and refresh this one you can see we now have four items. 00:26.190 --> 00:27.200 Now that's fine. 00:27.210 --> 00:28.670 We have added these values. 00:28.680 --> 00:31.680 Now let me delete these. 00:31.680 --> 00:32.570 So here I am. 00:32.610 --> 00:38.570 I have this coins in which all the data is stored the dial of our list and dictionary. 00:38.610 --> 00:41.940 So let me remove this one and interrupt that. 00:42.120 --> 00:44.880 Let me fetch it out from my database. 00:44.940 --> 00:49.020 Make sure you follow this carefully because we are going to do a lot of changes. 00:49.020 --> 00:52.850 So all I need to do is firstly fetch my data from my database. 00:52.950 --> 00:59.140 So let me use my cursor object and then team execute method and in which I need to pass select star 00:59.140 --> 01:00.200 from coins. 01:00.330 --> 01:06.840 Once that is done all I need to do is use fetch I'll come on and store everything in my coins. 01:06.870 --> 01:09.680 So now all the data is inside this coins. 01:09.690 --> 01:13.160 And if you want to confirm this we can print this one. 01:13.200 --> 01:19.450 So all I could do is use print come on and if I try to run this one I am going to get error because 01:19.460 --> 01:21.820 now we don't have this coin symbol. 01:21.820 --> 01:23.620 It could be something next position. 01:23.630 --> 01:27.360 So let me run this one see there and see what output we are going to get. 01:30.380 --> 01:35.260 Yeah we got our error but this is the result that we are getting from our coins. 01:35.290 --> 01:40.920 So we have some indexed position and inside that we have different index position that is totally fine. 01:40.930 --> 01:47.080 So what I'm going to do is we have tables inside our list so all we have to do is what we are following 01:47.080 --> 01:51.110 previously with our dictionary we need to do same with our table. 01:51.160 --> 01:53.160 Let me remove my print statement. 01:53.160 --> 01:56.880 So this statement is going to capture my first element of coin. 01:56.920 --> 01:58.260 Then iterate through it. 01:58.330 --> 02:02.110 Then second element then trade through it and so on. 02:02.110 --> 02:10.680 Now the thing is we were using coin symbol for our dictionaries but here we need to use in next position. 02:10.750 --> 02:17.440 Now the 0 8 index condition is for IDA Foster and exposition is for symbol second index position is 02:17.440 --> 02:21.520 for the amount of coin we own and the next position is for price. 02:21.880 --> 02:24.720 So all we need to do is we need to replace this thing. 02:24.820 --> 02:30.040 So wherever we are going to use this coin symbol I just need to replace it with a coin. 02:30.100 --> 02:32.450 And then the first and next position. 02:32.490 --> 02:41.310 So let me use some simple replace command so insert of my coins number I am going to use coin and then 02:41.310 --> 02:43.730 first index exposition replace all. 02:44.610 --> 02:46.220 Now we have our coin on. 02:46.260 --> 02:49.040 So that would be replaced with a next position second 02:53.700 --> 02:55.040 so I need to replace all. 02:55.460 --> 02:57.950 Now the third one is the price I have paid 03:00.770 --> 03:05.210 so it would be replaced by indexed for the part and replace all. 03:05.930 --> 03:10.300 So all the values that we are showing now would be from our database. 03:10.310 --> 03:12.820 Let me run this one and see if I'm going to get an error 03:15.740 --> 03:16.150 this one. 03:16.150 --> 03:16.440 Fine. 03:16.450 --> 03:20.510 We have four coins that is PDC 88 Excel modern neo. 03:20.750 --> 03:22.610 And this is working fine. 03:22.610 --> 03:27.410 Now what we need to do is we need to add some functionality with that content application. 03:27.410 --> 03:29.020 So that would be our next step. 03:29.060 --> 03:33.440 So we need to add fields to take it up and then add to our database. 03:33.740 --> 03:36.910 So we need to create fields so we can enter this data. 03:37.040 --> 03:41.270 Click on an add coin button so that data would be saved in our database. 03:41.270 --> 03:47.090 So before that we also need to clean up our code and we'll be starting with all this adding delete data 03:47.120 --> 03:48.230 from my next lecture. 03:48.530 --> 03:49.790 So see you in the next one.