java mysql PreparedStatement: can I get the full query that it's about to execute ?
Posted
by ufk
on Stack Overflow
See other posts from Stack Overflow
or by ufk
Published on 2010-06-14T15:32:01Z
Indexed on
2010/06/14
15:32 UTC
Read the original article
Hit count: 145
Hiya. I'm working with PreparedStatements with MySQL server.
example:
String myQuery = "select id from user where name = ?";
PreparedStatement stmt = sqlConnection.prepareStatement(myQuery);
stmt.setString(1, "test");
stmt.executeQUery();
ResultSet rs = stmt.getResultSet();
how can I receive the full sql query that is about to be executed on the mysql server?
thanks!
© Stack Overflow or respective owner