PDA

View Full Version : SQL Like Statement Help


ryancooper
09-08-2010, 01:23 PM
I am trying to sellect all threads that have a tag of Orlando and or Florida

How can I do this?

This is what I have for one and it works but I don;t know how to add the And/OR part!

SELECT threadid, title, postusername,postuserid,dateline
FROM " . TABLE_PREFIX . "thread
WHERE taglist LIKE 'orlando'
ORDER BY dateline DESC
LIMIT 5

Thanks for any help!

Marco van Herwaarden
09-09-2010, 06:30 AM
WHERE taglist LIKE '%orlando%' OR taglist LIKE '%florida%'

ryancooper
09-09-2010, 12:32 PM
Thank You, Thank You, Thank You! I tried so many ways!