Advertisement:

Select * where "[review]" in subject

Aloittaja JayRoe, toukokuu 03, 2008, 01:20:23 IP

« edellinen - seuraava »

JayRoe

As the title suggests. How do I phrase this correctly?

$result = mysql_query('SELECT id_topic, id_board, poster_time, poster_name, subject FROM smf_messages
WHERE id_board IN (' . $use_boards .')
AND "[review]" IN (subject)
');


Basically what I want to do is, find posts that have "[review]" in the subject, without the quotation marks. It works if the subject is "[review]", but if I change the subject to "[review]this game", it stops working.

rsw686

SELECT id_topic, id_board, poster_time, poster_name, subject
FROM smf_messages
WHERE id_board IN (' . $use_boards .')
AND subject LIKE '%[review]%'
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

JayRoe


Advertisement: