<div>Hi Blaine</div><div><br></div><div>You should probably not be using the DB API to load the field value. Since (in theory) we are able to have our actual field data stored in various back-ends, you should only really load the data via node or entity loading functions. </div>
<div><br></div><div>The node table itself is still reliably in Sql though, so you can select which node to display via the DB API. </div><div><br></div><div>Peter</div><div><br></div><div><br></div><div><br></div><div><br>
</div><div><br></div><br><br><div class="gmail_quote">On 23 January 2011 19:33, Blaine Lang <span dir="ltr">&lt;<a href="mailto:Blaine.Lang@nextide.ca">Blaine.Lang@nextide.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have a need for a block that will display a random quote. Node type =<br>
&#39;random_quote&#39; and only 1 random record should be displayed<br>
<br>
In D7 the body contents are in field_data_body and I have it working<br>
using the DB API but it would probably be better using the<br>
entityController class methods like &#39;entity_load&#39;<br>
<br>
I see that you can pass in conditions but is it possible to return a<br>
single random record?<br>
<br>
Does anyone with more experience with the new EntityController have any<br>
recommendations?<br>
<br>
Thanks!<br>
<br>
<br>
</blockquote></div><br>