When I do an extension to Question2Answer, and I use the qa_db_select_with_pending() function, if I have an "IN" clause in my selectspec "source", I get no results back. For example, if I have the following selectspec and I execute it with that function:
$tagwords = "'select','jquery','css'";
$tagidrows = qa_db_select_with_pending(
array(
'columns' => array('^words.wordid'),
'source' => "^words WHERE ^words.word IN ($)",
'arguments' => array($tagwords),
)
);
However, if I use an "=" clause in my source, for example,
'source' => "^words WHERE ^words.word = $",
and I break this into separate queries (one query for each word in this example), I do not have this issue.
When I use my MySQL client, and manually run the query
SELECT qa_words.wordid FROM qa_words WHERE qa_words.word IN ('select','jquery','css')
then I get results back just fine, no problem. This leads me to believe the query syntax is not the issue.
The same applies if I use the qa_db_single_select function.
Why is this the case?