Forums

"IN" and "NOT IN" statements Error

O
octav posted Oct 27, 2020 at 09:46
Hello,
Please advise why i cannot us "NOT IN" and "IN" conditions (available in conditions dropdown). When using them i get error like in image.
Thanks
where-conditions.JPG
error.png
Max_admin posted Oct 27, 2020 at 15:32
Answer
use the array syntax:
{value:[1,2,3]}
Or better use v7 which has a multi select for this!
Max
ChronoForms developer...
O
octav posted Oct 29, 2020 at 08:40
I would prefer to continue using v6 for a while. I have tried the above syntax and still error.
Actually i need this condition to in the read_data action:
Model.metakey IN ({var:list})
(where the list var is an array from a php action).
Any ideas how can i achieve this considering that IN and NOT IN conditions are not working in v6.
Max_admin posted Oct 29, 2020 at 22:54
if the value is an array then it should work, what does the debug show ?
Max
ChronoForms developer...
W
webcrea posted Nov 9, 2020 at 11:56
Hi,
I have the same issue
I tried
{value:(var:[tableau])} where tableau is an array
{value:(var:tableau)} where tableau is an array
And Itried {value:(var:chaine)} where chaine is like 47,48,49
All give an error
[h1]1064[/h1][h2]You
have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near
''(var:tableau)'' at line 1 [/h2]
Notice that with directly the value like {value:[47,49,48]} it works.
The fact is how to pass a var in this condition?
Thanks
ps : in mysql the query works.
Chris
Max_admin posted Nov 10, 2020 at 04:06
1 Likes
what about {var:tableau} ?
Max
ChronoForms developer...
W
webcrea posted Nov 10, 2020 at 08:11
Very nice, that's work well
Thanks Max
You need to login to be able to post a reply.

 2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for
goods and services provided by ChronoEngine.com