Writing text file to Mysql lazarus / 16-Databases ---------------------------------------------------------------------- Noobie · 2021-07-21 07:30 I have a mysql db where is table with five columns, like id, machine 1..3 and log where is 1 to 15 rows. All machines have state from 0 to 3 and common log file which is updated every 60-70 seconds. How do I write a log file to specific column like.. id | m1 | m2 | m3 | log 1     0      2       2     A1332                                A2321                                B4435                                A2212 2     0       1      0     C3322                                A2231 Thanks! ---------------------------------------------------------------------- dseligo · 2021-07-22 08:01 There is a couple of ways to accomplish this. I.) You can write log in each row like below. You probably can't have primary key in this way, or you could add 'rowno' or similar as autoincrement primary key. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i id  | m1   | m2    | m3  | log1     0      2       2     A13321     0      2     2     A23211     0      2       2     B44351     0      2       2   A22122     0      1       0     C33222     0      1       0     A2231 II.) You could write each 'id' in one separate row (as you suggested it), but 'log' column should be big enough to store maximum possible 'log' values (plus separators). Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i id  | m1   | m2    | m3  | log1     0      2       2     A1332 A2321 B4435 A22122     0      1       0     C3322 A2231 III.) Add another table. In the parent table you store 'm1', 'm2' and 'm3'. In the child table you store 'log' values. Column 'id' is link between tables. Parent table would look like this: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i id  | m1   | m2    | m31     0      2       22     0      1       0 Child table would look like this: Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i id  | log1   A13321     A23211     B44351     A22122     C33222     A2231