I'm new to Parameterized SQL, What I'm about doing is updating stuff with it, It's fine there, But i have a (log) table that holds that Parameterized SQL as Description of what happened, When i insert Parameterized SQL to log_table
it keeps showing "?" this symbol
code to save log:
PreparedStatement stat;
ResultSet rs;
String sql="insert into rozhanai_log values (null,?,?,?)";
try
{
stat = conn.prepareStatement(sql);
stat.setString(1,sqlParadanan);//(sqlParadanan) is my parameterized SQL String
stat.setTimestamp(2,time);
stat.setString(3,empName);
stat.execute();
}
catch (Exception e)
{
System.out.println("log Nabw");
e.printStackTrace();
}
and SQL String in (log) table shown like this:
update rozhanai_customer_account set rozhanai_money_balance = rozhanai_money_balance + 1000.0 where rozhanai_account_id=?
what can i do here?
i was thinking about something like (re-set the parameters)?
thanks