How to create foreign key in phpMyAdmin

Поділитися
Вставка

КОМЕНТАРІ • 131

  • @ImranIsak
    @ImranIsak 2 роки тому +58

    Top tip, if you *don't see the relations view tab*
    1) Select your table
    2) Click operations in the navigation, at the top
    3) Change the engine to InnoDB

  • @pascallasalo1445
    @pascallasalo1445 Рік тому +9

    You are a blessing from God, may he protect and give you success in life. I pray you have long life, filled with joy and happiness.

  • @nick_jacob
    @nick_jacob 4 роки тому +16

    I struggled with this for two whole days reading documentation. I understand it but for some reason nothing was working. I scrapped my database and recreated it. I had no idea the designer view was available and that was super awesome to see. Thumbs up for this.

  • @rizkancool
    @rizkancool 2 роки тому +20

    Great Tutorial , without wasting the time explaining the methods in very clear way

  • @Dev_Jet
    @Dev_Jet Рік тому +8

    I really appreciate the clear and accurate explanation. This was a fantastic tutorial!

  • @bharathgohrani1043
    @bharathgohrani1043 2 роки тому +5

    Brother it is amazing people like you, who keep this world moving forward. Respect 💯

  • @DJFreshJuice
    @DJFreshJuice 3 роки тому +3

    Really helpful! The documentation for this was so bad and this really helped me out, thank you!

  • @josezavala2309
    @josezavala2309 2 роки тому +1

    Thank you for getting to the point and explaining this topic clearly!

  • @hitesh-patil
    @hitesh-patil 3 роки тому +13

    Thank you for demonstrating in such an easy way.

  • @irminadaniel8711
    @irminadaniel8711 3 роки тому +1

    So straight to the point and very clear.

  • @MrWhinewine
    @MrWhinewine Рік тому

    Thank you for taking your time explaining everything so clearly.

  • @Dclockvideos
    @Dclockvideos Рік тому

    A true Godsend this is. Perfection. UA-cam at its finest.

  • @pheonixslayer21
    @pheonixslayer21 3 роки тому +3

    This was a life saver, thanks man!!

  • @jonasmoyo9479
    @jonasmoyo9479 3 роки тому +1

    Thank you very much this was easy and straight to the point.

  • @steven361
    @steven361 2 роки тому

    Straight to the point. Great video 👍

  • @akaijoe3582
    @akaijoe3582 Рік тому

    i really appreciate the clear and accurate explanation

  • @Sjwatts
    @Sjwatts 5 місяців тому

    Filled in my knowledge gaps from college, cheers!

  • @laudermarauder
    @laudermarauder 3 роки тому

    Thank you sir, this was perfect. Much appreciated.

  • @gedankens4029
    @gedankens4029 3 роки тому +3

    Great, simply but effective explained. But also important: id columns have to be same data type and same attribute, else it will not work.

  • @drishtirajai7848
    @drishtirajai7848 Рік тому

    Very helpful. Thumbs up to this guy!

  • @vishalpattar5025
    @vishalpattar5025 2 роки тому

    Really delivered what expected from the video.

  • @jamesr2408
    @jamesr2408 Рік тому

    Very useful. Patched the holes in my head. Thanks. ;-)

  • @nomnomfuckthisnewnick
    @nomnomfuckthisnewnick 6 місяців тому

    Thanks for the tutorial, this help me so much on my final exam

  • @CarlMahnke
    @CarlMahnke 2 роки тому

    Exactly what I needed!

  • @maisonjoseph8281
    @maisonjoseph8281 2 роки тому

    Thanks a million, Sir...
    That was so helpful

  • @johnnychunli
    @johnnychunli 3 роки тому

    straight to the point!

  • @snakewideo5474
    @snakewideo5474 4 роки тому +1

    Thanks for this, this tutorial was very helpfull

  • @infoentertainia
    @infoentertainia 2 роки тому

    Bundle of Thanks. Very helpful video.

  • @bsythdd4754
    @bsythdd4754 2 роки тому

    nice! now i know how to create foreign key in myphpadmin. thanks!

  • @udityadutta8929
    @udityadutta8929 2 роки тому

    Best tutorial ever.... Thank you

  • @SeisMan001
    @SeisMan001 7 місяців тому +1

    Finally i forgot to change my foregin key to unsigned that worked!

  • @rashmikadeshan2710
    @rashmikadeshan2710 5 місяців тому

    Thank you so much. Keep up the great work.

  • @jtrenchard1974
    @jtrenchard1974 2 роки тому

    Thanks - really 'to-the-point' - helpful!

  • @ashwanimodi25
    @ashwanimodi25 3 роки тому +1

    Thank you
    It was really helpfull.
    Thanks again

  • @ronnelmacompas1647
    @ronnelmacompas1647 2 роки тому

    Thanks man. This is really helpful

  • @LightningFox2407
    @LightningFox2407 3 роки тому

    Super helpful - thanks!

  • @danieltauil5457
    @danieltauil5457 3 роки тому +2

    Great explanation! Thank you very much!

  • @bhanukaweerasekara525
    @bhanukaweerasekara525 2 місяці тому

    This is very helpful. Thank you very much. 👍

  • @mahammad4051
    @mahammad4051 2 роки тому

    clear explanation, thank you !

  • @MeshaMesho
    @MeshaMesho 3 місяці тому

    thank you sir for that easy tutorial !!

  • @maduabewardana7900
    @maduabewardana7900 9 місяців тому +1

    Thank you,Its really important

  • @aclaputra8379
    @aclaputra8379 3 роки тому +1

    Thank you sir great explanation

  • @prozio
    @prozio 4 роки тому +1

    thanks for this short tutorial..

  • @presramh
    @presramh 2 роки тому

    Well explained ! Thanks!

  • @juanmagm
    @juanmagm 2 роки тому

    Gracias! Buena explicación.

  • @djaluyudhistira3835
    @djaluyudhistira3835 3 роки тому

    I still don't understand. I can't gives two Foreign Key Constraints for One Constraint properties. Why ?

  • @laszlogyor6628
    @laszlogyor6628 11 місяців тому +1

    Great job, thank you. 👍

  • @ninhongnguyen
    @ninhongnguyen Рік тому +1

    Wow, just a short video but it's very useful

  • @sheetalchand8546
    @sheetalchand8546 2 роки тому

    Question: can we not create a foreign key without index first? If we have to create a foreign key in a query do we first need to set index and then creat fk?

  • @gurpreetkait
    @gurpreetkait 2 роки тому

    Thanks bro, it helped

  • @minwun
    @minwun 2 роки тому +1

    thanks man this saved me

  • @kp7330
    @kp7330 4 роки тому

    Sir how can you store user table id in posts table i want know that pls sir.

  • @ducminhduong7602
    @ducminhduong7602 10 місяців тому

    I don't understand, do I need to create two CRUDs for two tables so it can connect to each other?

  • @harvirreturn
    @harvirreturn Рік тому

    Top tip, if it fails, then check if the attribute and type are the same eg. int(10), unsigned

  • @laibaabbasi3966
    @laibaabbasi3966 3 роки тому +1

    helping material......thanks

  • @chakibbounoun2349
    @chakibbounoun2349 2 роки тому

    To the point. I liked it..

  • @shahindomar3958
    @shahindomar3958 4 роки тому

    Sir,
    Can You tell Me.How I can Insert data into database using Php Form.

  • @alexa_ak6270
    @alexa_ak6270 5 місяців тому

    very helpfull, thanks!

  • @Andrey007007PC
    @Andrey007007PC 3 роки тому

    great! but why we need update attribute if we used only delete example

  • @mosesegboh
    @mosesegboh 2 роки тому

    Lovely video, the best

  • @cireguisse7499
    @cireguisse7499 3 роки тому +3

    how did you create the user_id before making it a foreign key in posts table ? how the post is automatically assigned to the author id ? thanks

    • @xaviorxason2611
      @xaviorxason2611 3 роки тому

      Yes, I'm wondering the same thing. if u found answer pls let me

  • @creative.money_eu
    @creative.money_eu 3 роки тому +1

    Awesome video.

  • @dailydoseofluv
    @dailydoseofluv 5 місяців тому

    thank you so much!

  • @EliAzoura
    @EliAzoura 11 місяців тому

    Thank you !

  • @Zsolt055
    @Zsolt055 3 роки тому +1

    Thank you so much bro🤚

  • @JohnSmith-xt8xu
    @JohnSmith-xt8xu 2 роки тому

    In our bachelors in hons (BSIT) we did ever did not create a foreign key and after 4 years the video learn me how to make foreign key, universities now a days are producing waste, nive and aimless generation no counselling no future careers just complete semesters and credit hours fuck that

  • @nooruddin943
    @nooruddin943 2 місяці тому

    Great....Thanks too...

  • @cosminboglis5160
    @cosminboglis5160 Рік тому

    Thanks! Very usefull!

  • @cheemslovers8856
    @cheemslovers8856 7 місяців тому +1

    Thank you soo much

  • @nandopookey9195
    @nandopookey9195 Рік тому

    thank you so much sir

  • @thirilwin8309
    @thirilwin8309 3 роки тому

    it is really helpful

  • @adnanmalik65901
    @adnanmalik65901 3 роки тому

    awesome vedio thanks

  • @arseneintwari6438
    @arseneintwari6438 2 роки тому

    what do i do if i have more than one foreign key which foreign keu do i choose??

  • @donpornrodkrajub5234
    @donpornrodkrajub5234 8 місяців тому +1

    thank you

  • @md.shorifulhasan3149
    @md.shorifulhasan3149 2 роки тому

    Thanks a lot

  • @spencerntow3145
    @spencerntow3145 11 місяців тому

    i need help bro my brand ID and category ID always zero

  • @rahulshetty3849
    @rahulshetty3849 2 роки тому

    Thank you🙏

  • @francescomassaro546
    @francescomassaro546 Рік тому

    dope!

  • @danfrith924
    @danfrith924 5 місяців тому

    the last method seem way more fun! lol

  • @sriramnagnath8302
    @sriramnagnath8302 2 роки тому +1

    nice explanation in short period.

  • @AntonioSouzaISC
    @AntonioSouzaISC 5 місяців тому

    Thanks

  • @rw7799
    @rw7799 10 місяців тому +1

    i dont see a relation view button in my new table but have one in my users table... not sure why

    • @Josh-Casey
      @Josh-Casey 9 місяців тому +1

      Change storage engine to InnoDB. Under Operations tab in PHPMyAdmin, or run ALTER TABLE your_table_name ENGINE=InnoDB;

  • @herdifariz7934
    @herdifariz7934 Рік тому

    thx man

  • @oleshka2588
    @oleshka2588 3 роки тому

    Thank you

  • @whyjamesisacommonname
    @whyjamesisacommonname Рік тому

    wow!

  • @imranlashari6578
    @imranlashari6578 2 роки тому

    best

  • @kosminhokosmodosguri2038
    @kosminhokosmodosguri2038 2 роки тому

    ty

  • @kprakash9665
    @kprakash9665 2 роки тому

    hello how to use this all with html and css

  • @the_gost_gamer3841
    @the_gost_gamer3841 3 роки тому +1

    thanks

  • @sosscs
    @sosscs Рік тому +1

    I cannot find the relation view, and for some reason, I cannot also fine the left panel tree

    • @Josh-Casey
      @Josh-Casey 9 місяців тому

      Change storage engine to InnoDB. Under Operations tab in PHPMyAdmin, or run ALTER TABLE your_table_name ENGINE=InnoDB;

  • @ciscocapita
    @ciscocapita 4 роки тому +3

    Thanks but i can´t see the funtion relation view in new version, can u helpe me?

    • @BharathYammanur
      @BharathYammanur 4 роки тому +6

      Change table's database engine to innodb

  • @mirmuxsinkhamroev2552
    @mirmuxsinkhamroev2552 2 роки тому

    thanks man

  • @paungster
    @paungster 5 місяців тому

    👍

  • @foreversingleeditz7207
    @foreversingleeditz7207 3 роки тому

    non skipable adds hnn

  • @soubhagyakumarbarik4374
    @soubhagyakumarbarik4374 2 роки тому

    It doesn't allow deleting child row

  • @adamakomou7318
    @adamakomou7318 2 роки тому

    Would be better if you could slow down when actually creating the Foreign Key Constraint. I didn't understand the Constraint Properties input "Test".

    • @alphaomondi484
      @alphaomondi484 2 роки тому

      I think test is just a name given to the foreign key

  • @dhavalsanghvi2283
    @dhavalsanghvi2283 2 роки тому

    once i created foreign key than i am not able to insert data in database can you help me out

    • @alphaomondi484
      @alphaomondi484 2 роки тому

      You should insert data in the users table first

  • @IshiroaKimita
    @IshiroaKimita 2 роки тому

    how did you code this to update the user_id when the post were submitted??

    • @VicodeMedia
      @VicodeMedia  2 роки тому

      What do you mean?

    • @IshiroaKimita
      @IshiroaKimita 2 роки тому

      @@VicodeMedia
      No matter the constraints I use, when I try to update the foreign key in the table it gives an error saying I can't update the foreign key.

  • @guillermobautista4419
    @guillermobautista4419 2 роки тому

    1000 likes! Thanks!!

  • @samisadat7451
    @samisadat7451 2 роки тому

    what to do when the datatyoes are not same?

    • @VicodeMedia
      @VicodeMedia  2 роки тому

      You IDs should always be integer