vendredi 8 mai 2015

Execute a sql query and assign result to a variable in FTL file

I want to execute a SQL query (if a value exist in a table or not) inside ftl file and based on the result 1 or 0 I want to do further operations.

Like:

IF EXISTS(SELECT 1 from DataDb:tbl_conf
                                WHERE name="IsEnabled")
THEN

I do not want to execute this query again and again, i just want to store this Query's value to a variable and then use it anywhere in my ftl file.

Aucun commentaire:

Enregistrer un commentaire