Using a query like this:
$postdata = qa_db_read_one_assoc(
qa_db_query_sub('
SELECT userid, content FROM ^posts
WHERE content LIKE "%'.$word.'%"
)
);
will bring security issues.
I'd like to use the $ "placeholder" to insert the $word and have a secure query. But:
$postdata = qa_db_read_one_assoc(
qa_db_query_sub('
SELECT userid, content FROM ^posts
WHERE content LIKE $
), "%'.$word.'%"
);
Does not work.
Is there any way of how to get the % as MYSQL part into the query and use the $ for the qa_db_query_sub().