Home > database >  According to the current in the MySQL ID field how to retrieve the next data?
According to the current in the MySQL ID field how to retrieve the next data?

Time:10-02

, help me, I have two tables in MySQL, A table has an Id value, A Name value, table B is watches, I want to add the Id value can get B in the table names, and add the second Id value, can automatically get B in the table under A Name, and the person's Name is empty, and return to start, you have what idea?
I write the Java, there is a demand, insert into the database, input ID automatically add attribute names, and people often change, add or delete, built a personal list, so
A table B table can be redesigned,
One great god provides a train of thought, thank you.

CodePudding user response:

Programming problems, there is no connection with the database
The old evil often B table is cached in the program, enter the ID, read from the cache information display
Can also according to the input ID ID real-time database query, shows the query results, but it is easy to cause the database bottleneck

CodePudding user response:

Can't add in the program, because people watch also can have several people to have permission to modify, so, must be based on the database side, now on the input current ID get a name of a name has language implements, want when names are now traverse again will start later, and, when people B table called empty across, in considering to don't add case when statement judgment
  • Related