Query only returning 100 records at a time? I am trying to export data from a database to a csv file, I am using the code below to retrieve the data from the DB, but it only returns 100 rows, how can I fix that?

$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
$criteria-&gt;section = 'educators';
$query = craft()-&gt;elements-&gt;buildElementsQuery($criteria);
$query-&gt;order('title asc');
$queryResults = $query-&gt;queryAll();
$educators = EntryModel::populateModels($queryResults);

foreach ($educators as $educator) {
   //Write to file
}
Craft imposes a default limit of 100 for element queries. To disable this you need to specify a limit of null.

$criteria-&gt;limit = null;