This is my mysql query:
SELECT *
FROM wp_bp_group_documents
WHERE group_id = 4
AND id IN (2)
AND (file LIKE '%jpg'
OR file LIKE '%png'
OR file LIKE '%jpeg'
OR file LIKE '%gif')
ORDER BY created_ts DESC LIMIT 0, 20
and this is my table structure:
'id', 'user_id', 'group_id', 'created_ts', 'modified_ts', 'file', 'name', 'description', 'featured', 'download_count'
'1', '1', '1', '1301587327', '1301587327', '1301587327-NewApplicationForm.pdf', 'Tenancy application form', 'This is a tenancy application form. Please download and fill in.', '0', '0'
'2', '1', '4', '1301934439', '1302005432', '1301934439-bupa_large.png', 'BUPA Stand Image', 'asd', '0', '0'
So from this query I expect it to find the second record in the database, however it returns no values.
There are no mysql errors. I'm just wondering if I've done the query right?
Thank you