i want to use a WILDCARD for everything in the statement beneath:
"SELECT threads.*
FROM thread_tag_map, threads, tags
WHERE thread_tag_map.thread_id = threads.id
AND thread_tag_map.tag_id = tags.id
AND (tags.name IN ('WILDCARD'))";
What should I replace the WILDCARD with to be able to select every entry? I have tried ('*') but that doesnt work.
i could drop the last row but the thing is that i am making this to a function. passing a value lets say $value. and the $value will replace WILDCARD. so when i pass 'computer' as $value it will get all rows for computer. but then i want to be able to pass nothing and the default $value will be a wildcard to select everything. so how can i make this possible?