Answers.Body: <p>You would do that using an ElementCriteriaModel:</p>
  
  <pre class="lang-php prettyprint-override"><code>$criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
  $criteria-&gt;section = 'mySectionHandle';
  $criteria-&gt;limit = null;
  
  $entries = $criteria-&gt;find();
  </code></pre>
  
  <p>You can read all about how to work with ElementCriteriaModel’s in the <a href="http://buildwithcraft.com/docs/plugins/working-with-elements">Working with Elements</a> guide in the Craft docs.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-30T14:32:05.140Z
Answers.LastActivityDate: 2014-06-30T14:33:54.547Z
Answers.LastEditDate: 2014-06-30T14:33:54.547Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>Is there any known way to get all the entries from a certain channel? I dont want to do this in a view but in PHP since i need to do a bulk update of an attribute to all the entries in a certain channel.</p>
  
Tags: <plugin-development>
Title: Get all entries from a channel
ThreadText: # Get all entries from a channel
  
  (Asked by: username_0 on 2014-06-30)
  
  Is there any known way to get all the entries from a certain channel? I dont want to do this in a view but in PHP since i need to do a bulk update of an attribute to all the entries in a certain channel.
  
  **Tags:** plugin-development
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2014-06-30. Score: 12 | Accepted answer
  
  You would do that using an ElementCriteriaModel:
  
  ```php
  $criteria = craft()->elements->getCriteria(ElementType::Entry);
  $criteria->section = 'mySectionHandle';
  $criteria->limit = null;
  
  $entries = $criteria->find();
  
  ```
  
  You can read all about how to work with ElementCriteriaModel’s in the [Working with Elements](http://buildwithcraft.com/docs/plugins/working-with-elements) guide in the Craft docs.
  
  
  ---
  
  