So I have issue with searching through wp_comments table. This is some custom meta created by the custom plugin. This is what needs to be searched for https://prnt.sc/a2IXbLNVKs11
$q = "SELECT comment_id, meta_value
FROM wp_commentmeta
WHERE meta_key = 'course_completion'
AND meta_value LIKE '" . $course\['id'\]. "%," . date('Y-m-d', strtotime('-24 months')) . "%'";
Except that I need to implement in it Between two dates.
For example:
Between date('Y-m-d', strtotime('-24 months'))
and date('Y-m-d', strtotime('-2 months'))
I have tried subquery, nested query, and everything I could think about, but no luck, no results for searching between two dates.
Can you help? Thank you