简体   繁体   中英

Emulation of Java application on PHP

Scenario:

We have a PHP/MySQL based corporate web portal and a separate MS SQL database on a remote server which could be accesed by a 3rd party vendor Java application(web client communicating with the MSSQL database).

Requirement:

I would like to get rid of that Java application and transfer all functionalities to the PHP web portal and I need to figure out the queries as I don't have the source code of that Java application and there is no way to reach the vendor to ask.

Is there any way I can capture the queries that Java application is sending so I can use those in my PHP scripts?

Maybe tracing last queries from MSSQL somehow? Or

Somehow see what the Java application emits to the database in some way?

While you can log incoming queries coming into the server ( How to see query history in SQL Server Management Studio ) you are still going to rewrite most of the queries as I'm sure most of them will be dynamic. You will simply see the end result in the log like this:

select * from users where id=5

While in the php code it will be a mysqli or pdo function that binds the 5 value to a prepared statement. So you will have to figure out why or how the java application came up with the query it did.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM