Tell me, please, as in the request:

String query2 = "select message from messages_type WHERE str ='qwe'" 

instead of str = 'qwe' use str = var_qwe , where var_qwe is my local String variable used in the program?

  • one
    Type in Google - mysql bind variable. And format the code snippets in question. - 0xdb
  • What language and framework do you plan to access MySQL from? - Kromster

1 answer 1

Try:

 String var_qwe = "some text"; String query2 = "select message from messages_type WHERE str ='" + var_qwe + "'"; 
  • Thanks, it worked! - prometey_qwe
  • @prometey_qwe please tick the question as a tick opposite for those who stumble on the subject in the future. - Denis