Язык 666 с апострофами и кавычками

This commit is contained in:
2021-11-19 17:26:07 +06:00
parent 07a7e2fff6
commit 4a270bc28c

View File

@ -2163,7 +2163,7 @@ public class DBMSRecords implements ServletContextAware {
Statement st = null; Statement st = null;
try { try {
st = conn.createStatement(); st = conn.createStatement();
String sql = "select t.translation from main._translations t where t.identifier='"+key+"' and t.language_id='"+user.language_id+"';"; String sql = "select case when '"+user.language_id+"'='666' then t.translation||'''\"' alse t.translation end as translation from main._translations t where t.identifier='"+key+"' and (t.language_id='"+user.language_id+"' or ('"+user.language_id+"'='666' and t.language_id=1));";
rs = st.executeQuery(sql); rs = st.executeQuery(sql);
if(rs != null) { if(rs != null) {
if (rs.next()) { if (rs.next()) {