All language subtitles for 2. Inserting data

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

They're all right welcome back and by the students.

It's time for us to start learning how to run queries in our application.

We are going jumping into the database which is really cool.

There are a couple ways of inserting reading and doing the crawl basically which is create a read up

day in the lead or destroy in BHB that's what it means right for my school or any other application

right.

So it's time for us to learn how to do is there are a couple ways of doing this in allowable we have

things called Rauh square Aquarius which is the first thing that we are going to be learning because

I want you to learn the hard way of doing things.

There is another way of using the model which is the class that takes care of the database interaction

.

Right.

And there's another way of doing that model has different methods like say Oh they'd destroy or I mean

the lead in a has different methods that we can use right right out of the bots.

Right.

But we also have something called the eloquent model that we can also use to do differing database interaction

which is really cool you're going to see a lot of this and we're going to be doing a lot of queries

to our application is going to be pretty cool right.

I hope that you are really excited because I am all right this is really cool stuff.

But anyway so I want you to learn the hard way.

Like I said before because I want you to be ready for anything and I like to show you as much as I can

.

All right.

So we're going to pack this course with a lot of information that way you know where you are when you're

building an application.

You can always find your way around.

If you get in trouble so I'm going to come in this hour I mean routes by the way routes that BHB and

you should know how to get there by now.

If not if you are in BHB store I'm using a Mac shift shift.

Then you can type in your abbreviation to get here your name of that class.

So I'm going to comment that our roads are going to come in this hour and we're going to create a road

related to what we are doing and what we're going to be doing is inserting some data into our polls

table that we created.

I remember the migrations.

All right.

So now I'm going I want to create a little comment there and BHP story has shortcuts for comments if

you want to learn how to use is in the PH B-story Web site.

And by the way if you're wondering if they pay me money to actually mention their grade ID they're not

actually pay me any money.

I just like their idea or recommend it.

All right guys.

You can find the link in my web site.

And when does that come.

It's pretty cool.

But anyway you can also look it up online guys BHB storm.

You know let's go and create a route a get request.

I remember that's just what his function does.

And let's say when people click insert.

Of course we're not going to do this for real in a production environment.

This is just an example right guys for you to learn.

So we're going to create a closure function here so that way when we visit this you are out here these

insert we execute some type of code.

Right.

So what we're going to be doing is using a method a static method from the DB class or Faqih as they

call it.

Then you can look it up right on line is F A C A D E array for.

C.A.T..

So let's use the insert static method and if you don't know what a static method is please take my ph

B P class which is a basic for B of Jerry into programming for BHP because you will now understand is

if you have not taken of Jerry into programming class you don't have to specifically specifically take

mine but I'm hoping that you like me by now and you take my classes but if not you can take any other

classes it's OK.

So what we going to be doing is we're going to say insert this like a normal Querrey.

All right we're going to be running wrote querist and this is what it is.

Insert into pools and we're going to say we're going to put a couple of values in.

If you remember we have the title I believe.

Right.

So let's just open it up and we say I want you to insert that title and I believe this content.

And what else.

And now values would be.

And if I leave it like that that's OK.

So the values would be and this is like this because this is PDL remember that we need to put the placeholder

question marks.

We can also use we can also use a placeholders.

The did the colon.

OK so I'm going to be using this question marks.

So once we have this then we can run the second parameter here and put an array.

OK.

And this is where we put the values.

So the value for the first one would be BHB Claribel something like this.

Right.

Then the second That's the first parameter second parameter would be the content ph B.

Clarabelle is the best thing

that has happened

to PGE her Hey cool if I got it correctly.

Sounds about right is actually correct and he says Aley you don't spend Larabee like that.

Look at that.

All right.

Happened.

He has even the grammar.

All right.

Decide these gray I tell you I love you guys.

So this looks about right.

Insert into pulls.

We have the values here.

This has to be close right here.

OK.

So we need a parentheses there.

There we go.

OK.

Title values Dand here is making sure we got to correct the guys.

Yeah this sounds about right.

This looks about right.

OK.

I think I'm forgetting something but that's OK.

So once we run this we can just run that query Now let's try it let's go and I'm forgetting something

hopefully this would give us the exception so that way we know insert and then enter that we go where

we assuption now found see a mess both those exist.

All right.

So for some reason it did not find it enough find the table.

All right of course that's OK.

The base table view now found.

All right let's see if we're spending the table correctly.

Let's click here and Lara Stone has this really cool stuff where if you see if you see like you have

a problem like a highlighter statement and you use put your mouse over it.

Wait for this libel click it and you can choose from different options here.

I'm going to choose to import this class.

Now let's run this again.

Enter as to how the problem is.

It wasn't that that was OK.

So he's saying that he can't find the table.

All right.

So that's because probably we don't have the table so let's go to BHB Miami and check that out real

quick.

I want you to go there real quick before I even get there.

And let's check it out.

Probably we need to run

migrate or something like that.

Let's just go to law Bill see a mass as you can see.

We need to roll migration.

All right cool.

So let's go to our terminal right here and let's just say BHP Ortiz and agree.

Well there we go.

Now let's take the poor out.

I think it would work without it.

Let's just take this out leave it like this and let's go and do it again anther.

OK looks like it worked.

Let's go back to that.

Here we have the polls.

We click on it and we have some information.

Look at this.

All right of course winning with the not created the time or the updated that we could if we wanted

to.

All right.

You can put a time function in there and you have the time.

All right so now you know how to insert queries are using role as well.

Querrey functionality will Arabo which is pretty cool.

So in the next election we're going to continue going over the crowd doing this.

And but the next functions are super similar or the next method if you want to call it that.

Thank you so much and I see you in the next lecture

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.