When querying for entries, I'm stuck on how to query for "selected" fields.

The query I'm using:

$criteria = craft()->elements->getCriteria(ElementType::Entry);
$criteria->sport = 'tennis';

$players = $criteria->find();

This works just fine, but I also need to query further using a field that is a multi-select field. I'd like to do something like:

$criteria->tournaments->wimbledon = "selected";

This obviously doesn't work though. Does anyone know if this is possible and/or how to accomplish this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.