When using Database Custom Query, do I need to add the escape characters or not. Example:
In Navicat my query looks like this
select * from rezdy_orders_transactions_imported roti
inner join tripletex_payment_type_map tptm on tptm.tptm_rezdy_mapping = roti.roti_payment_type
where roti_order_number = 999296 and tptm.tptm_type_url = 'https://api.tripletex.io/'
and tptm.tptm_type_description = case when (length(roti.roti_payment_label) = 27 OR roti.roti_payment_label like '%stripe%' OR
roti.roti_payment_label like '%ch\_%' OR roti.roti_payment_label like '%pi\_%' OR roti.roti_payment_label like '%re\_%')
then 'Stripe' else 'Paypal' end;
While in Database Custom Query I use this
select * from rezdy_orders_transactions_imported roti
inner join tripletex_payment_type_map tptm on tptm.tptm_rezdy_mapping = roti.roti_payment_type
where roti_order_number = :P1 and tptm.tptm_type_url = :P2
and tptm.tptm_type_description = case when (length(roti.roti_payment_label) = 27 OR roti.roti_payment_label like '%stripe%' OR roti.roti_payment_label like '%ch_%' OR roti.roti_payment_label like '%pi_%' OR roti.roti_payment_label like '%re_%') then 'Stripe' else 'Paypal' end;
Which no longer has an escape character for %ch\_%
as when i left it in there and looked at the query in my inspector it had doubled up all the escapes I had manually entered like this %ch\\_%
.
Because both still worked I am unsure if I must leave them in or take them out to be honest, is Wappler recognizing the _ and auto escaping it for me.
Community Page
Last updated:
Last updated: