1 00:00:05,780 --> 00:00:06,380 Everyone. 2 00:00:06,890 --> 00:00:09,160 So now we are nearly done with our database. 3 00:00:09,380 --> 00:00:13,910 Just the delete on left and delete Come on it's very simple. 4 00:00:13,910 --> 00:00:16,040 Just here we have this one. 5 00:00:16,160 --> 00:00:20,300 We need to select any value and click on delete. 6 00:00:20,600 --> 00:00:23,650 And that back and all that one is also very easy. 7 00:00:23,660 --> 00:00:29,460 But the thing Hayes as I have told you these are live in concept with that one at which value to delete. 8 00:00:29,480 --> 00:00:35,060 Here you are clicking the values in this list box but we require something that can store that particular 9 00:00:35,060 --> 00:00:42,140 value so that the program can have an idea that which of the rows it must has to delete. 10 00:00:42,200 --> 00:00:51,720 I hope you get that one but I want to see him like these all these clicks are random so plus we let 11 00:00:51,780 --> 00:00:52,770 make that clear. 12 00:00:54,360 --> 00:00:56,910 And now let me move to one. 13 00:00:57,090 --> 00:01:03,420 So there is something we need to get this selected through that we have clicked and for that we have 14 00:01:03,550 --> 00:01:11,470 this function and it completely works on the event which is generally a click and now what we will do 15 00:01:11,500 --> 00:01:17,790 in that one we will take away the label that is a global variable so that it can be used in this function 16 00:01:18,130 --> 00:01:21,550 and also in other functions with the same value. 17 00:01:21,550 --> 00:01:27,650 And that is something like selected row the row I have selected there. 18 00:01:28,420 --> 00:01:35,300 And now what we will do we will just get the index of that particular row and parse that particular 19 00:01:35,300 --> 00:01:41,600 index to delete in that way that particular rule will be deleted from the database and how we will do 20 00:01:41,600 --> 00:01:42,110 that one. 21 00:01:42,110 --> 00:01:52,400 So to get the index is very simple just the list and their boss selection of a closer and then selection 22 00:01:54,070 --> 00:01:54,830 go. 23 00:01:55,190 --> 00:02:01,750 It will provide us the index of that particular row and all after that the let me show you what I want 24 00:02:01,750 --> 00:02:05,320 to see them here selected for equal to now. 25 00:02:05,350 --> 00:02:10,090 I will take this index and put that in the selected row variable. 26 00:02:10,330 --> 00:02:14,530 So list dot index sorry get index 27 00:02:17,600 --> 00:02:18,750 data. 28 00:02:19,150 --> 00:02:30,990 Now just print index save run your program and view all when I click any of these I go to index. 29 00:02:31,010 --> 00:02:34,130 So this is 0 1 2 3 and 4. 30 00:02:34,130 --> 00:02:36,280 So for an all after that one. 31 00:02:36,380 --> 00:02:44,420 So this goal showing all after Dec. 1 now 6 after that 1 0 after that one day we go. 32 00:02:44,630 --> 00:02:45,480 Now what this. 33 00:02:45,500 --> 00:02:49,100 After that one will affect our program. 34 00:02:49,100 --> 00:02:53,960 So what will happen if we do something like this when it will delete ditto and all up to date. 35 00:02:54,680 --> 00:02:58,420 So what we need here really quite just the index we are clicking. 36 00:02:58,440 --> 00:03:08,160 So for that one we will use here CDO which means just the first value statement now save run view all 37 00:03:08,610 --> 00:03:17,640 day we go with only 4 7 3 0 1 3 they will. 38 00:03:17,790 --> 00:03:24,120 Now we are getting the index and now at this point we can make anything with that but because we have 39 00:03:24,120 --> 00:03:29,620 the index not a delete just defined delete underscore command. 40 00:03:29,700 --> 00:03:39,250 There we go and do it very simple just back and not delete it just like the insert. 41 00:03:39,350 --> 00:03:42,830 There we are inserting devalue here we're deleting the value. 42 00:03:42,830 --> 00:03:51,460 So what we are deleting here that particular index selected or so selected drop and the zero Dettmer 43 00:03:52,630 --> 00:04:03,150 now run front end would be why few all let me remove the this one this segment deleted view again the 44 00:04:03,250 --> 00:04:13,970 0 0 we do not have passed that one to delete button they we have deleted and command it will do delete 45 00:04:13,980 --> 00:04:24,410 Come on save close and wanted again they will view all and now delete this one again view. 46 00:04:24,430 --> 00:04:25,500 They will go with that. 47 00:04:26,200 --> 00:04:30,030 Now the six day we do not have that. 48 00:04:30,510 --> 00:04:39,320 Now I'm going to delete this one with 1 2 to 19 delete view all day we go with that one so that it's 49 00:04:39,320 --> 00:04:42,210 now deleted. 50 00:04:42,260 --> 00:04:44,720 So here we are done with our database. 51 00:04:44,720 --> 00:04:50,030 One more thing you can add here is like whenever you are clicking any of these values they all must 52 00:04:50,030 --> 00:04:50,750 appear here. 53 00:04:50,780 --> 00:04:57,160 Like if I'm clicking this one then date earning and all things will appear here so that you can analyze 54 00:04:57,160 --> 00:05:05,490 better because here you need to scroll this one there and need to read the values in form of these tuples. 55 00:05:05,690 --> 00:05:10,670 So how you can do that one that is again very simple. 56 00:05:10,850 --> 00:05:12,350 Here we have to get selected draw. 57 00:05:12,800 --> 00:05:19,580 And when you select any of detail we will just insert all the values available here in these and how 58 00:05:20,030 --> 00:05:22,220 that we should determine first of all. 59 00:05:23,090 --> 00:05:25,780 I will do the entry delete. 60 00:05:26,240 --> 00:05:32,180 So if there's anything in that entry at that particular moment it will automatically delete that value. 61 00:05:32,180 --> 00:05:38,660 Like if I have something added there then when I click that one the first it will be clear and the values 62 00:05:38,660 --> 00:05:40,080 will be added then. 63 00:05:40,190 --> 00:05:58,320 So even even though delete from 0 2 and there we go now this one for all 6 3 2 2 3 4 5 and 6 so at this 64 00:05:58,320 --> 00:06:00,330 point they will all became clear. 65 00:06:00,840 --> 00:06:11,670 And to add the values there we will do even dot insert after the end that particular selected draw. 66 00:06:13,180 --> 00:06:20,930 So here just bus selected draw with the index of that particular one save. 67 00:06:22,590 --> 00:06:25,680 And then I do that one run it again 68 00:06:28,980 --> 00:06:30,840 view all plugging this one. 69 00:06:30,870 --> 00:06:34,890 There we go in the python one 1 2 ninety. 70 00:06:35,070 --> 00:06:42,720 So I'm getting data in the python that is something unexpected so let me first add this one in all of 71 00:06:42,720 --> 00:06:44,130 the others. 72 00:06:44,130 --> 00:06:50,970 There we go in that one. 73 00:06:51,000 --> 00:06:51,420 There you go. 74 00:06:52,480 --> 00:06:59,910 Now just change the tuples and the entries there like this one is one this one is going to do three 75 00:07:00,210 --> 00:07:01,450 four five. 76 00:07:01,490 --> 00:07:11,950 And there you go six days the tuples do three four five and six save. 77 00:07:12,020 --> 00:07:14,660 Hey I'm digging one and not zero. 78 00:07:14,660 --> 00:07:19,090 The reason for that one fewer students are thinking is because we also have an idea. 79 00:07:19,760 --> 00:07:21,660 And we are not inserting that idea. 80 00:07:21,680 --> 00:07:23,110 That's why I have taken for one. 81 00:07:23,270 --> 00:07:25,260 So don't get confused with that one. 82 00:07:25,330 --> 00:07:28,980 First of all clear this one alone liquid run front end. 83 00:07:29,770 --> 00:07:33,620 Maybe you now just view all like any of these. 84 00:07:33,650 --> 00:07:36,860 And David go so all the values are written here. 85 00:07:36,920 --> 00:07:40,220 Exercise diet take on 500 it study in Python. 86 00:07:40,220 --> 00:07:41,300 David. 87 00:07:42,110 --> 00:07:49,200 Now you can just make these delete also and now they have no debt. 88 00:07:49,880 --> 00:07:53,970 So this is about this one in the next video we will have a look at a main program. 89 00:07:54,330 --> 00:07:55,410 So thanks for watching. 90 00:07:55,420 --> 00:07:56,280 See the next video.