Get entries which have content like '%findme%' I am creating a more robust find and replace plugin which shows what is being replaced and where. I need to query for all entries(or content records?) where content is like '%findme%'. 

Should I query for entries or should I query for content records for this find and replace?

I saw that there is an EntryRecord, so I can give it CDBCriteria object to find but there is no ContentRecord so how do I get the content with the string in it? 

This is all I have so far. 

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;limit = $model-&gt;limit;
$relaventContent = ContentService::model()-&gt;findAll($criteria);
It's up to you what you prefer to use. Usually people use the ElementCriteriaModel. You could achieve your goal with the record itself too but it requires more code.

The ElementCriteriaModel provides more ready-to-use options and returns populated entries, Records provide only records, so no populated entries with all relations and such

I'm not sure what that $model-&gt;limit is supposed to do, maybe this is a setting in your globals, but you would normally search for entries that contains something (you can find the rules here) with this code

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;search = 'yourKeyWord';
$relaventContent = $criteria-&gt;find();


If you just want to have all entries you would do

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;limit = null;
$relaventContent = $criteria-&gt;find();