Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7942649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:02:16+00:00 2026-06-04T00:02:16+00:00

I have 2 tables in which one column in one table will reference one

  • 0

I have 2 tables in which one column in one table will reference one in another table.
I would like to know how can I make table B (referenced)‘s column data changed whenever table A(referencing)‘s column data is changed

That is

A [a1, a2]
a1 = {1,2}

B [b1, b2]

b1 is referenced by a1, and b1 = {1,2} therefore if I change a1 values using phpmyadmin to {2,5} then click save, after that I would like b1’s values are automagically changed too.

Update:

Now it works, but I don’t see any referenced data in the second table? I mean the values of b1 is empty, It should be the same with a1 I think.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T00:02:17+00:00Added an answer on June 4, 2026 at 12:02 am

    To do this, create the foreign keys with ON UPDATE CASCADE (requires InnoDB for the storage engine, but that’s a good default).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table in which in one of the column I would be
i have a large mysql database table in which one column contains values ranging
I have a database table named 'student' in which there is one column named
I have SMO code which copies tables from one database to another. It runs
I have a table which has several one to many relationships with other tables.
I have a table which needs to link one of three seperate tables, but
I have a table which looks like this one: | id | fk_book |
I have a table which is referenced by foreign keys on many other tables.
I have one database table which contains 8 columns. One of the columns is
I have query table copyQuery which has Soil Condition has one of the columns,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.