Custom Query misbehaving when using stored functions

OS infofds

  • Operating System : Windows 10.0.18363
  • Wappler Version : 3.7.4

Problem description

Using MySQL and PHP
When trying to run a SQL stored function from within a custom query, the custom query chops the result.

To test this problem, I created a small test function (fMyTestFunction) that returns the value of a database row. The code used in this function can be seen below (as routine body)

Running this stored function from the SQL Mgmt UI (Using Heidi to do that), I see the function returns exactly what is supposed to return based on the content of the database. In this case, it is the string shown below:

image

If, however, I try to run the same function from within Wappler using a Custom Database Query, the result for some reason is chopped.

Steps to reproduce

  1. Create a stored function that returns a string like this Approve    <i class=“fad fa-thumbs-up”/i>
  2. Ensure the function works outside of Wappler
  3. Insert the function in a Wappler Custom Query
  4. Click on the Execute Query button

Hope this helps. Many thanks,

Alex

So is the result missing only in the custom query UI, or also when you run your server action in the browser?

Hi Theodor,
Gosh, I did not think of running the server action API in the browser. It returns what I expected there, so the problem seems to be confined to the UI of the Custom Database Component.

This is one of the known issues with Wappler where HTML gets rendered instead of being shown on the UI.

This has been fixed in Wappler 3.7.5

1 Like

Many thx!

Alex Schoijett
+1 647-924-7253

This topic was automatically closed after 45 hours. New replies are no longer allowed.