XModPro

Passing string parameter to SELECT statement using WHERE IN

Jen Sharp Jen Sharp asked Dec 20, 2019
Active Dec 20 · Viewed 2007 times
<p>I need to pass a string value into a template that uses a SELECT statement and needs multiple values. So, I'm using WHERE column_name IN ('xxxxx','xxxxx') ... that's all fine when it is hard coded in. But the parameter needs to be that string inside those parentheses. This seems to be a matter of using quotes, double quotes, two single quotes to escape a single quote, etc. But I cannot get the parameter to pass to the SELECT statement with any results, or with any errors that I can see. Is this even possible then? How else can I pass multiple values to a single select statement using WHERE IN? Posting a fiddle next to accompany this. </p>

2 Answers

Loading answers...