[SOLVED] MariaDB/MySQL not finding result in database lazarus / 16-Databases ---------------------------------------------------------------------- DanishMale · 2024-08-01 13:24 Hi all, I try to execute this SQL via ZEOS: 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 SELECT * FROM `tablename` WHERE LOWER(`column2`) LIKE LOWER('The%sample%is%made%by%me%'); Expected result from column1 would be 'Example' However, I do NOT receive the expected result, even that column2 contains a recordset with 'The sample' Database recordset looks like this id   column1    column2 ..... 23  Example    The sample ..... ---------------------------------------------------------------------- dseligo · 2024-08-01 15:45 This has nothing to do with Zeos. Where condition in your query expects words 'The', 'sample', 'is', 'made', 'by' 'me' in column2. If column2 would contain string 'The sample bla is bla made bla by bla me bla' then you'll get your row. Or if you change your query to: Code: SQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i SELECT * FROM `tablename` WHERE LOWER(`column2`) LIKE LOWER('The%sample%'); ---------------------------------------------------------------------- DanishMale · 2024-08-01 16:14 Thanks  I was just hooked on an idea which according to your explanation won't work And I found a "workaround" 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 SELECT * FROM `tablename` WHERE LOWER(`column2`) LIKE LOWER(SUBSTR('The%sample%is%made%by%me%',1,LENGTH(`column2`)));