dongzi5062 2014-03-21 13:05
浏览 73
已采纳

在PHP上模拟Java应用程序

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?

  • 写回答

1条回答 默认 最新

  • dousi4257 2014-03-21 13:18
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 各位请问平行检验趋势图这样要怎么调整?说标准差差异太大了
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题
  • ¥15 wpf界面一直接收PLC给过来的信号,导致UI界面操作起来会卡顿
  • ¥15 init i2c:2 freq:100000[MAIXPY]: find ov2640[MAIXPY]: find ov sensor是main文件哪里有问题吗
  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab