1 00:00:05,770 --> 00:00:06,570 Here you go. 2 00:00:06,770 --> 00:00:08,960 So welcome to another video about the Bakken. 3 00:00:09,010 --> 00:00:14,590 So I have submitted the video input too because that one it became very large and I need to explain 4 00:00:14,590 --> 00:00:15,430 this search Come on. 5 00:00:16,240 --> 00:00:20,510 So that's why I speak a decision so a fresh video full of fresh folks. 6 00:00:21,370 --> 00:00:23,600 So let's begin this search. 7 00:00:23,920 --> 00:00:25,760 So define search. 8 00:00:26,530 --> 00:00:32,920 So for that one before defining this one let me add some values there so that we can search some of 9 00:00:32,920 --> 00:00:34,430 the values in that one. 10 00:00:34,570 --> 00:00:48,930 So insert first let we have 1 1 2 0 1 9 then hundred after that one did exercise. 11 00:00:49,120 --> 00:00:52,710 Then after that one what we have there 12 00:00:55,310 --> 00:01:02,990 study so did study after that one night taken 13 00:01:07,160 --> 00:01:07,800 and then last. 14 00:01:07,800 --> 00:01:09,690 We have by. 15 00:01:10,260 --> 00:01:21,280 So step by step maybe go and copy these value goes down using so they we have this one and one more 16 00:01:21,340 --> 00:01:39,650 in so tail and the debate say the same for 1 0 1 9 data with one done based this whole so not deed which 17 00:01:39,680 --> 00:01:49,930 is this study not study medical instrument same maybe go with this. 18 00:01:49,930 --> 00:01:55,190 Now let me feel drained. 19 00:01:55,840 --> 00:02:00,050 View and Dave we had three entries. 20 00:02:00,060 --> 00:02:02,260 One is with one to 2019. 21 00:02:02,370 --> 00:02:10,690 Then one by nineteen then four for ninety so now that we remove these lines and define of as such. 22 00:02:11,290 --> 00:02:15,450 So search is something that we have not done before and is very easy. 23 00:02:16,150 --> 00:02:23,510 Most of the commands are seen like this but not like this like the feel for because we need to have 24 00:02:23,510 --> 00:02:27,470 some role that will fetch the values and show the up. 25 00:02:28,160 --> 00:02:34,760 So they we have these values and what we require to change here required to pass better meet us in view 26 00:02:34,770 --> 00:02:36,010 we have no parameter. 27 00:02:36,260 --> 00:02:41,920 But in this one we need to positive better does so all these Ben-Ami does. 28 00:02:41,940 --> 00:02:43,740 There must be these 29 00:02:46,510 --> 00:02:47,910 pass them him. 30 00:02:48,230 --> 00:02:48,950 No. 31 00:02:49,260 --> 00:02:53,650 What in case when the user just entered the exercise or just died. 32 00:02:53,800 --> 00:02:55,460 What about the the enemy does. 33 00:02:55,480 --> 00:02:57,150 So what really we do here. 34 00:02:57,220 --> 00:03:03,730 We will pass empty strings so they are going to be empty strings then 35 00:03:07,290 --> 00:03:08,110 so incase. 36 00:03:08,120 --> 00:03:12,930 User did not enter anything then by default their value is null. 37 00:03:14,200 --> 00:03:19,800 So by this you posited me does to this such comma after that one. 38 00:03:19,850 --> 00:03:24,380 In this one select start from Robin will remain same. 39 00:03:24,400 --> 00:03:25,540 What will change here. 40 00:03:25,540 --> 00:03:32,640 The condition here we need to just add via data equal to caution Mark. 41 00:03:32,680 --> 00:03:37,540 And now we will use or condition like user is going to provide one value. 42 00:03:37,540 --> 00:03:43,290 Then what we will do will use or condition that feature one of these is provided by the user. 43 00:03:43,510 --> 00:03:49,920 And no cash go my SO earnings equal to caution Mark board. 44 00:03:50,350 --> 00:03:59,680 If user had provided the exercise so exercise equal to question mark or this study equal to portion 45 00:03:59,680 --> 00:04:12,440 mark or die equal to question mark and then last or buy ton equal to question mark debut now off to 46 00:04:12,460 --> 00:04:22,480 that one I call my here and just pass these parameters so copy from there based them here we go. 47 00:04:23,320 --> 00:04:27,880 Now this is the search function that really quite saved this one. 48 00:04:28,340 --> 00:04:29,230 And now let me try. 49 00:04:31,360 --> 00:04:41,150 So search first X is equal to search because we also need to discern and search something like data 50 00:04:41,200 --> 00:04:44,330 will do and what data we have. 51 00:04:44,360 --> 00:04:49,120 Say for 1 2 19 so 4 1 2 0 1 9. 52 00:04:50,610 --> 00:05:03,900 Then print x save run data go only the one that have this date for 1 to 90 and if I do something like 53 00:05:04,050 --> 00:05:05,780 what we have the things there. 54 00:05:06,330 --> 00:05:11,800 These two common two hundred and two hundred so earnings equal to 200. 55 00:05:12,450 --> 00:05:15,330 Need to wonder. 56 00:05:16,080 --> 00:05:18,990 Now we have two of out of three. 57 00:05:19,260 --> 00:05:24,700 That is 1 to 19 and 4 1 2 19 with 200 earnings. 58 00:05:25,320 --> 00:05:29,490 So this is a search common and perfectly working fine. 59 00:05:29,700 --> 00:05:32,100 So all of our commands are working fine here. 60 00:05:32,160 --> 00:05:34,150 Now we have a perfect database. 61 00:05:34,500 --> 00:05:38,580 Just there are two things too many first one. 62 00:05:38,610 --> 00:05:43,640 Just imagine we are working with other application and at this point we had the database. 63 00:05:43,650 --> 00:05:46,740 What if it doesn't have the database. 64 00:05:46,740 --> 00:05:52,020 So we have done here something like we have first connected this one by using the function first connect 65 00:05:52,680 --> 00:05:56,070 and at that point that is created a table in the database. 66 00:05:56,070 --> 00:06:00,280 But what if there is no database then we need to again call that one. 67 00:06:00,300 --> 00:06:03,450 So this is the first thing we need to add here a connect. 68 00:06:03,450 --> 00:06:03,780 Come on. 69 00:06:04,740 --> 00:06:08,530 But what if there is already existing data. 70 00:06:08,820 --> 00:06:13,120 So in that case it will provide me an ETA like I had saved this one. 71 00:06:13,140 --> 00:06:18,430 And when I run this one I got the data by table who already exist. 72 00:06:18,480 --> 00:06:19,110 So what. 73 00:06:19,110 --> 00:06:21,060 In that case. 74 00:06:21,060 --> 00:06:28,050 So what we will do here is we may make this one remain here and we will add one more line here. 75 00:06:28,170 --> 00:06:29,250 Create table 76 00:06:31,940 --> 00:06:35,690 if not existence. 77 00:06:36,020 --> 00:06:40,280 So if the table in the database doesn't exist that create a table. 78 00:06:40,280 --> 00:06:49,220 Otherwise we have that table already so if we do this fun and run the file legging then deal in that 79 00:06:49,220 --> 00:06:53,440 case we could no end game no way to. 80 00:06:53,630 --> 00:07:00,740 So this is complete about a bacon and now we did not require any change in despair we would just add 81 00:07:00,740 --> 00:07:08,210 a line here in the boat back and that's enough save this one and we are done with this. 82 00:07:09,140 --> 00:07:13,490 So this is about this video in the next video we looked at how we can connect these. 83 00:07:13,640 --> 00:07:15,850 So thanks for watching and I would see in the next video.