The following works as expected when there is a single value stored in a variable.
SET @a := \"20100630\";
SELECT * FROM wordbase WHERE verified = @a;
>
There's good solution described here: https://stackoverflow.com/a/11957706/1523961
So can use something like this:
SET @a := '20100630,20100701';
SELECT * FROM wordbase WHERE FIND_IN_SET(verified, @a);
Also, if you're selecting the ids for @a
from another table, you can come up with following:
SET @a := (SELECT GROUP_CONCAT(id) FROM someTable where yourBooleanExpressionHere);
SELECT * FROM wordbase WHERE FIND_IN_SET(verified, @a);