添加参数后获取SQL语句 [英] Get SQL statement after parameters added

查看:124
本文介绍了添加参数后获取SQL语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在添加参数后,是否有办法(在MySQL中)获取纯SQL语句?一旦开始使用参数,我的其中一条语句就会出现问题,我想看看正在执行什么.当然,它与日期有关.

Is there a way (in MySQL) to get the pure SQL statement after parameters have been added? I'm having issues with one of my statements once I start using parameters, and I want to see what's being executed. Of course it has to do with dates.

使用MySQL .NET连接器.我可以访问MySQL服务器,并且使用SQLYog进行管理.

Using MySQL .NET Connector. I have access to MySQL server, and I use SQLYog to administrate.

谢谢! -史蒂夫

推荐答案

您可以使用查询日志选项记录发布到服务器的所有查询.

You can use the query logs option to have all queries issued to the server logged.

请参见 http://dev.mysql.com/doc/refman/5.1/en/server-logs.html 了解有关日志类型以及如何启用和配置它们的信息.

See http://dev.mysql.com/doc/refman/5.1/en/server-logs.html for information about the log types and how to enable and configure them.

这篇关于添加参数后获取SQL语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆