[ZeosDBO/TZQuery] Passing a parameter that is a list of integer for MariaDB lazarus / 16-Databases ---------------------------------------------------------------------- rdxdt · 2025-06-13 12:53 Hello, i'm porting an application and i have to do the following query 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     venda_pagamento.id,    venda_pagamento.pagamento_id,     SUM(venda_pagamento.valor) AS valor_total,    forma_pagamento.tipo FROM     venda_pagamentoINNER JOIN forma_pagamento ON venda_pagamento.pagamento_id = forma_pagamento.idWHERE     venda_pagamento.venda_id IN (:venda_ids) GROUP BY    venda_pagamento.pagamento_id, venda_pagamento.id, forma_pagamento.tipo How can i set the parameter :venda_ids to be a list of integers for that query on MariaDB The SQL Syntax would be like 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 venda_pagamento.venda_id IN (1,3,4,6,8,9,11,12,19) ---------------------------------------------------------------------- zeljko · 2025-06-13 13:57 YourParam.AsString := YourStringList.CommaText ? (contains numbers in TStringList) ---------------------------------------------------------------------- rdxdt · 2025-06-13 14:13 If the parameter type is ftString then it will have this result 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 venda_pagamento.venda_id IN ('1,3,4,6,8,9,11,12,19'), which would not work. The prepared query should look like 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 venda_pagamento.venda_id IN (1,3,4,6,8,9,11,12,19)It would work if ZeosDBO supported Macro, then a raw macro would work perfectly, but from testing does not seem like it supports. ---------------------------------------------------------------------- zeljko · 2025-06-13 14:40 Then use Format() ... Format('WHERE myitems in (%s) ',[AItemsCommaSeparated]); ---------------------------------------------------------------------- rdxdt · 2025-06-13 14:54 My previous reply still applies, once Zeos parse the parameter as ftString it will encapsulate it's content in single quotes. But nevermind, i made the query in another way that won't require this anymore.