6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<div class="intro">
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<p>In this example, the Flickr Recent Photos YQL table is used to pull in a small set of recent Flickr images every 8 seconds.</p>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<div class="example">
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass {{>yql-requery-source}}
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<h3>Setting Up the Query</h3>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<p>The easiest way to build a YQL query is by visiting the <a href="http://developer.yahoo.com/yql/console/">YQL Console</a>. In this example we will be using the <code><a href="http://developer.yahoo.com/yql/console/#h=select%20*%20from%20flickr.photos.recent">flickr.photos.recent</a></code> table. The <code>YQL</code> statement that we are using looks like this:</p>
8e13d74e6b6797ec62039f6f0cab4d9b9e2d70aeDav Glassselect * from flickr.photos.recent where (api_key = "1895311ec0d2e23431a6407f3e8dffcc")
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<h3>Setting Up the YUI Instance</h3>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<p>Now we need to create our YUI instance and tell it to load the <code>yql</code> and <code>node</code> modules.</p>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav GlassYUI().use('node', 'yql');
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<h3>Making the Query</h3>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass<p>Now that we have a YUI instance with the <code>yql</code> module, we can now make a query.</p>
6cbf89e74d4d69da16fb41d09e3d044bc01b64f1Dav Glass{{>yql-requery-source-js}}