athene: (athene)
[personal profile] athene
For the group database project that's due in a week, we already made all these PHP forms and started adding some data and then oops, we realize that we didn't actually make any Foreign Key (FK) to Primary Key (PK) links between any of our 22 tables.

So I did some quick internet research and found out that we had created MyISAM tables when we needed InnoDB tables to link FKs. Then I figured out how to change the tables and how to use the SQL box in PHPmyAdmin to make changes to multiple tables at once. After that I figured out how to use PHPmyAdmin GUI interface to create FK links (it was actually really really easy).

But the image_media table kept giving me a "mysql error 1452" error when I tried to link gameID to the game table, even though the link from characterID to the character table worked just fine. I finally figured out that since we had already been playing with PHP forms, a game with the PK 1 was accidentally deleted, but because we hadn't linked the tables, the record in image_media that said it came from game FK 1 was still there. I changed the record in image_media to the right FK and it worked fine. I even changed the PK in the games table and it automatically updated it in the image_media table.

Yes, I am awesome!

Date: 2007-11-28 05:40 am (UTC)
From: [personal profile] artemis42
Hooray for you and your awesomeness!

-Me.

Date: 2007-11-28 05:59 am (UTC)
From: [identity profile] jhrtirjfgfjkcfh.livejournal.com
i understood about two words in this.

Date: 2007-11-28 07:07 am (UTC)
From: [identity profile] threegee.livejournal.com
whoopsie! phpmyadmin is a resource hog, but it certainly makes things easier.

October 2015

S M T W T F S
    123
45678910
11121314 151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 3rd, 2026 11:22 pm
Powered by Dreamwidth Studios