I've one php program with 2 tables : Account / Characters (dt1) And C# program with the same struct (dt2).
I would like to know the best way to update my dt2 from my dt1, and should I do.
Like if someone signs up on my php program, I save is informations in my dt1 then i would like to update in my dt2. And if user create new Characters in my c# program, I save new information in my dt2 then i would like to update my dt1
dt1 mysql dt2 MySql Server
Thank.
Please provide a better question to answer. What are you exactly trying to accomplish, why and other specifics i.e. database type and database software?
1) You either set up a sync/replication between the databases.
2) Or you can programmatically process data from one DB and then update the other DB with it.
UPDATED ANSWER
Use the same database for both the PHP and C# program.
Just don't forget to use transactions.
Second Update
Use a client-server model.
Create a file that will act as a server in PHP and C#. These files will answer requests for data coming to them and act as an API
Create a file in both languages that act as the client. These files will contact the "server file" in the other programming language.
-- Now on every piece of data that you want to keep replicated across the databases will need to run client file to update the other database.
------- EG-------------
---Actions: Some adds data to accounts table using PHP
---Processing that takes place: The PHP file first adds the data to its database. Then it calls the server file in C# to add the data.
The C# server file takes the data it received from the PHP file and adds it to the database and returns the response.
The PHP file finishes processing once it has received a response from the C# program.