How to create foreign key in phpMyAdmin

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.ย. 2024
  • How to create foreign key in phpMyAdmin.
    Learn Advanced MySQL Features in PHP.
    Buy Me a Coffee ;)
    paypal.me/Vict...
    Hosting I Use:
    m.do.co/c/e924... (Get $100 in credit over 60 days)

ความคิดเห็น • 133

  • @ImranIsak
    @ImranIsak 3 ปีที่แล้ว +61

    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

    • @tertiusscheepers8357
      @tertiusscheepers8357 3 ปีที่แล้ว +4

      Thanks buddy i could not see the table in the tables field. This tip sorted me out👍

    • @antoniofuller2331
      @antoniofuller2331 3 ปีที่แล้ว +2

      Hmm

    • @Ronhtokk108
      @Ronhtokk108 2 ปีที่แล้ว +3

      Thanks!!

    • @Ch0cken
      @Ch0cken 2 ปีที่แล้ว +2

      Legend

    • @juanmagm
      @juanmagm 2 ปีที่แล้ว +2

      Thanx🖖

  • @pascallasalo1445
    @pascallasalo1445 ปีที่แล้ว +10

    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 3 ปีที่แล้ว +20

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

  • @bharathgohrani1043
    @bharathgohrani1043 2 ปีที่แล้ว +5

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

  • @Dev_Jet
    @Dev_Jet ปีที่แล้ว +8

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

  • @hitesh-patil
    @hitesh-patil 4 ปีที่แล้ว +13

    Thank you for demonstrating in such an easy way.

  • @gedankens4029
    @gedankens4029 4 ปีที่แล้ว +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.

  • @DJFreshJuice
    @DJFreshJuice 3 ปีที่แล้ว +3

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

  • @Dclockvideos
    @Dclockvideos ปีที่แล้ว

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

  • @josezavala2309
    @josezavala2309 2 ปีที่แล้ว +1

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

  • @MrWhinewine
    @MrWhinewine ปีที่แล้ว

    Thank you for taking your time explaining everything so clearly.

  • @irminadaniel8711
    @irminadaniel8711 3 ปีที่แล้ว +1

    So straight to the point and very clear.

  • @akaijoe3582
    @akaijoe3582 ปีที่แล้ว

    i really appreciate the clear and accurate explanation

  • @nomnomfuckthisnewnick
    @nomnomfuckthisnewnick 8 หลายเดือนก่อน

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

  • @Sjwatts
    @Sjwatts 7 หลายเดือนก่อน

    Filled in my knowledge gaps from college, cheers!

  • @jonasmoyo9479
    @jonasmoyo9479 3 ปีที่แล้ว +1

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

  • @pheonixslayer21
    @pheonixslayer21 3 ปีที่แล้ว +3

    This was a life saver, thanks man!!

  • @jamesr2408
    @jamesr2408 ปีที่แล้ว

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

  • @vishalpattar5025
    @vishalpattar5025 2 ปีที่แล้ว

    Really delivered what expected from the video.

  • @rashmikadeshan2710
    @rashmikadeshan2710 6 หลายเดือนก่อน

    Thank you so much. Keep up the great work.

  • @SeisMan001
    @SeisMan001 9 หลายเดือนก่อน +1

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

  • @laibaabbasi3966
    @laibaabbasi3966 3 ปีที่แล้ว +1

    helping material......thanks

  • @bhanukaweerasekara525
    @bhanukaweerasekara525 4 หลายเดือนก่อน

    This is very helpful. Thank you very much. 👍

  • @maduabewardana7900
    @maduabewardana7900 11 หลายเดือนก่อน +1

    Thank you,Its really important

  • @drishtirajai7848
    @drishtirajai7848 ปีที่แล้ว

    Very helpful. Thumbs up to this guy!

  • @danieltauil5457
    @danieltauil5457 3 ปีที่แล้ว +2

    Great explanation! Thank you very much!

  • @MeshaMesho
    @MeshaMesho 5 หลายเดือนก่อน

    thank you sir for that easy tutorial !!

  • @bsythdd4754
    @bsythdd4754 2 ปีที่แล้ว

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

  • @ninhongnguyen
    @ninhongnguyen ปีที่แล้ว +1

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

  • @udityadutta8929
    @udityadutta8929 2 ปีที่แล้ว

    Best tutorial ever.... Thank you

  • @infoentertainia
    @infoentertainia 2 ปีที่แล้ว

    Bundle of Thanks. Very helpful video.

  • @steven361
    @steven361 2 ปีที่แล้ว

    Straight to the point. Great video 👍

  • @aclaputra8379
    @aclaputra8379 3 ปีที่แล้ว +1

    Thank you sir great explanation

  • @harvirreturn
    @harvirreturn ปีที่แล้ว

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

  • @CarlMahnke
    @CarlMahnke 2 ปีที่แล้ว

    Exactly what I needed!

  • @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

  • @sriramnagnath8302
    @sriramnagnath8302 2 ปีที่แล้ว +1

    nice explanation in short period.

    • @VicodeMedia
      @VicodeMedia  2 ปีที่แล้ว

      I'm glad you liked it

  • @laszlogyor6628
    @laszlogyor6628 ปีที่แล้ว +1

    Great job, thank you. 👍

  • @laudermarauder
    @laudermarauder 3 ปีที่แล้ว

    Thank you sir, this was perfect. Much appreciated.

  • @ashwanimodi25
    @ashwanimodi25 3 ปีที่แล้ว +1

    Thank you
    It was really helpfull.
    Thanks again

  • @maisonjoseph8281
    @maisonjoseph8281 3 ปีที่แล้ว

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

  • @cheemslovers8856
    @cheemslovers8856 9 หลายเดือนก่อน +1

    Thank you soo much

  • @snakewideo5474
    @snakewideo5474 4 ปีที่แล้ว +1

    Thanks for this, this tutorial was very helpfull

  • @prozio
    @prozio 4 ปีที่แล้ว +1

    thanks for this short tutorial..

  • @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.

  • @minwun
    @minwun 3 ปีที่แล้ว +1

    thanks man this saved me

  • @johnnychunli
    @johnnychunli 3 ปีที่แล้ว

    straight to the point!

  • @mahammad4051
    @mahammad4051 2 ปีที่แล้ว

    clear explanation, thank you !

  • @ronnelmacompas1647
    @ronnelmacompas1647 2 ปีที่แล้ว

    Thanks man. This is really helpful

  • @jtrenchard1974
    @jtrenchard1974 2 ปีที่แล้ว

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

  • @Zsolt055
    @Zsolt055 3 ปีที่แล้ว +1

    Thank you so much bro🤚

  • @chakibbounoun2349
    @chakibbounoun2349 2 ปีที่แล้ว

    To the point. I liked it..

  • @nooruddin943
    @nooruddin943 4 หลายเดือนก่อน

    Great....Thanks too...

  • @alexa_ak6270
    @alexa_ak6270 7 หลายเดือนก่อน

    very helpfull, thanks!

  • @presramh
    @presramh 2 ปีที่แล้ว

    Well explained ! Thanks!

  • @mosesegboh
    @mosesegboh 2 ปีที่แล้ว

    Lovely video, the best

  • @nandopookey9195
    @nandopookey9195 ปีที่แล้ว

    thank you so much sir

  • @daltonrandall4348
    @daltonrandall4348 หลายเดือนก่อน

    When you make the foreign key and then hover over each ID that is linked, how does the database know which column to show you (in this case, you only have a "name" column, but say there were a dozen columns in the "users" table)? Thanks!

  • @donpornrodkrajub5234
    @donpornrodkrajub5234 10 หลายเดือนก่อน +1

    thank you

  • @EliAzoura
    @EliAzoura ปีที่แล้ว

    Thank you !

  • @dailydoseofluv
    @dailydoseofluv 7 หลายเดือนก่อน

    thank you so much!

  • @LightningFox2407
    @LightningFox2407 3 ปีที่แล้ว

    Super helpful - thanks!

  • @cosminboglis5160
    @cosminboglis5160 ปีที่แล้ว

    Thanks! Very usefull!

  • @juanmagm
    @juanmagm 2 ปีที่แล้ว

    Gracias! Buena explicación.

  • @devthings01
    @devthings01 2 ปีที่แล้ว

    Thanks bro, it helped

  • @imranlashari6578
    @imranlashari6578 2 ปีที่แล้ว

    best

  • @adnanmalik65901
    @adnanmalik65901 3 ปีที่แล้ว

    awesome vedio thanks

  • @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?

  • @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

  • @danfrith924
    @danfrith924 7 หลายเดือนก่อน

    the last method seem way more fun! lol

  • @thirilwin8309
    @thirilwin8309 3 ปีที่แล้ว

    it is really helpful

  • @md.shorifulhasan3149
    @md.shorifulhasan3149 2 ปีที่แล้ว

    Thanks a lot

  • @the_gost_gamer3841
    @the_gost_gamer3841 3 ปีที่แล้ว +1

    thanks

  • @ducminhduong7602
    @ducminhduong7602 ปีที่แล้ว

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

  • @rahulshetty3849
    @rahulshetty3849 2 ปีที่แล้ว

    Thank you🙏

  • @whyjamesisacommonname
    @whyjamesisacommonname ปีที่แล้ว

    wow!

  • @Andrey007007PC
    @Andrey007007PC 3 ปีที่แล้ว

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

  • @djaluyudhistira3835
    @djaluyudhistira3835 3 ปีที่แล้ว

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

  • @rw7799
    @rw7799 ปีที่แล้ว +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 11 หลายเดือนก่อน +1

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

  • @sosscs
    @sosscs 2 ปีที่แล้ว +1

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

    • @Josh-Casey
      @Josh-Casey 11 หลายเดือนก่อน

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

  • @francescomassaro546
    @francescomassaro546 ปีที่แล้ว

    dope!

  • @herdifariz7934
    @herdifariz7934 ปีที่แล้ว

    thx man

  • @mirmuxsinkhamroev2552
    @mirmuxsinkhamroev2552 3 ปีที่แล้ว

    thanks man

  • @arseneintwari6438
    @arseneintwari6438 2 ปีที่แล้ว

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

  • @kosminhokosmodosguri2038
    @kosminhokosmodosguri2038 2 ปีที่แล้ว

    ty

  • @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

  • @paungster
    @paungster 7 หลายเดือนก่อน

    👍

  • @shahindomar3958
    @shahindomar3958 4 ปีที่แล้ว

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

  • @definitelynotje
    @definitelynotje หลายเดือนก่อน

    ey thanks

  • @kp7330
    @kp7330 4 ปีที่แล้ว

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

  • @spencerntow3145
    @spencerntow3145 ปีที่แล้ว

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

  • @guillermobautista4419
    @guillermobautista4419 3 ปีที่แล้ว

    1000 likes! Thanks!!

  • @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

  • @soubhagyakumarbarik4374
    @soubhagyakumarbarik4374 2 ปีที่แล้ว

    It doesn't allow deleting child row

  • @kprakash9665
    @kprakash9665 2 ปีที่แล้ว

    hello how to use this all with html and css

  • @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.

  • @foreversingleeditz7207
    @foreversingleeditz7207 3 ปีที่แล้ว

    non skipable adds hnn

  • @samisadat7451
    @samisadat7451 2 ปีที่แล้ว

    what to do when the datatyoes are not same?

    • @VicodeMedia
      @VicodeMedia  2 ปีที่แล้ว

      You IDs should always be integer