Replies: 2 comments 5 replies
-
Hello and welcome to SQLPage ! Which database are you using ? For instance, this is how you would do it in SQLite (the embedded database that is embedded in SQLPage): SELECT DISTINCT Ingredient.Name AS title FROM Ingredient INNER JOIN Xref ON Ingredient.Id=Xref.Ingredient
WHERE Xref.Dinner IN (select value from json_each(:SetDinner)); |
Beta Was this translation helpful? Give feedback.
5 replies
-
I implemented it in a replit as a demo: You can play with it directly from your browser here: https://replit.com/@pimaj62145/SQLPage-multi-select#index.sql |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm new to SQLpage and been testing it out it, now I have faced a problem that I can't work pass.
I've tried to search for answers, but with no luck.
I have a form as component with multiple choice, this work fine.
But my problem is that I want to use the result of my choices on my next page in a SQL queries.
This work fine if I don't use multiple choice, but when I set the parameter to multiple = true and use [] after the name I cant use it in my queries.
This is how I've set up the form:
I try to present the result for my SQL queries in a list:
But I'm not able to make this work.
If i print the result as text it look something like this: ["1","5","7"]
If I use the debug tool it look like this: {"component":"debug","contents":"["1","5","7"]"}
My queries work if the form result print it like this: "1"
Could anyone point me in the right direction for solving my issue.
BR
Tom-Erik
Beta Was this translation helpful? Give feedback.
All reactions