Jump to content

phpmyadmin keys


EchoFool

Recommended Posts

Hey there,

 

I curious to know if there was a way to link foreign keys to your main table in such a way that when you delete the row from the main table your database can auto delete the foreign keys from other tables ?

 

An example:

user_table:

  UserID  | Name |

    2      |  bleh  |

 

user_items:

UserID | Quantity | ItemID | RecordID

  2      |  3        |    2    |  956

 

 

Now if i delete User ID 2 from user_table is it possible for phpmyadmin to also delete UserID 2 from user_items and any other table which is interlinked like this ?

 

I can't find out how to do it on phpmyadmin, i was told you go to :

 

Click on the table you want

Click on the structures tab

Below the fields you should see a relation view

Which i did but all it shows me is information of the table nothing else.

 

Hope you can help me out.

Link to comment
https://forums.phpfreaks.com/topic/134931-phpmyadmin-keys/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.