Reading Mysql database lazarus / 16-Databases ---------------------------------------------------------------------- JJJ · 2021-06-30 12:50 Maybe a stupid question, but how do I read a single value from Mysql database to variable? I'm using TMySql57Connection and I'm able to write to db, but can't read it. ---------------------------------------------------------------------- dseligo · 2021-06-30 23:53 If you don't have it already, put TSQLQuery on a form and set Database and Transaction properties. Then you can do something like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SQLQuery1.Close;SQLQuery1.SQL.Clear;SQLQuery1.SQL.Append('select field_name1 '+                     'from your_table '+                   'where field_name2=''your_condition1'' and field_name3=''your_condition2'' ');SQLQuery1.Open;If not SQLQuery1.EOF then  ShowMessage(SQLQuery1.Fields[0].AsString);SQLQuery1.Close;